Dont crash on NULL ts to rpmtsInitIterator()

This commit is contained in:
Panu Matilainen 2010-05-28 10:27:01 +03:00
parent 3f38850609
commit be1c4872c1
1 changed files with 4 additions and 1 deletions

View File

@ -154,7 +154,10 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
char *tmp = NULL;
int xx;
if (ts->keyring == NULL)
if (ts == NULL)
return NULL;
if (ts && ts->keyring == NULL)
loadKeyring(ts);
if (ts->rdb == NULL && rpmtsOpenDB(ts, ts->dbmode))