summaryrefslogtreecommitdiff
path: root/lib/rpmps.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-01-22 12:09:45 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-01-22 12:09:45 +0200
commit111efde99a42c8841fa50d682fd340c73c00268b (patch)
tree4fd802a0ee93edd2d651f2498faf54c78e6b020c /lib/rpmps.c
parentf128fea076b510bbe934579d9821eff5f9dff802 (diff)
downloadrpm-111efde99a42c8841fa50d682fd340c73c00268b.tar.gz
rpm-111efde99a42c8841fa50d682fd340c73c00268b.tar.bz2
rpm-111efde99a42c8841fa50d682fd340c73c00268b.zip
Return NULL instead of blowing up on invalid rpmpsGetProblem()
- thanks to Pixel for spotting
Diffstat (limited to 'lib/rpmps.c')
-rw-r--r--lib/rpmps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmps.c b/lib/rpmps.c
index 871cdeeb3..6f059c705 100644
--- a/lib/rpmps.c
+++ b/lib/rpmps.c
@@ -105,7 +105,7 @@ rpmProblem rpmpsGetProblem(rpmpsi psi)
if (psi != NULL && psi->ix >= 0 && psi->ix < rpmpsNumProblems(psi->ps)) {
p = psi->ps->probs + psi->ix;
}
- return *p;
+ return p ? *p : NULL;
}
rpmps rpmpsCreate(void)