diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-01-22 12:09:45 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-01-22 12:09:45 +0200 |
commit | 111efde99a42c8841fa50d682fd340c73c00268b (patch) | |
tree | 4fd802a0ee93edd2d651f2498faf54c78e6b020c /lib/rpmps.c | |
parent | f128fea076b510bbe934579d9821eff5f9dff802 (diff) | |
download | librpm-tizen-111efde99a42c8841fa50d682fd340c73c00268b.tar.gz librpm-tizen-111efde99a42c8841fa50d682fd340c73c00268b.tar.bz2 librpm-tizen-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.c | 2 |
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) |