It would return an invalid entry instead of NULL.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5095
b64f7644-9d1e-0410-96f1-
a4d463321fa5
hb_dict_entry_t * hb_dict_next( hb_dict_t * dict, hb_dict_entry_t * previous )
{
- if( !dict || !dict->objects )
+ if( dict == NULL || dict->objects == NULL || !dict->count )
return NULL;
- if( !previous )
+ if( previous == NULL )
return &dict->objects[0];
unsigned int prev_index = previous - dict->objects;
if( prev_index + 1 < dict->count )