accept NULL values in hashtable enumerator
This commit is contained in:
@@ -332,8 +332,14 @@ static bool enumerate(private_enumerator_t *this, void **key, void **value)
|
|||||||
|
|
||||||
if (this->current->enumerate(this->current, &pair))
|
if (this->current->enumerate(this->current, &pair))
|
||||||
{
|
{
|
||||||
*key = pair->key;
|
if (key)
|
||||||
*value = pair->value;
|
{
|
||||||
|
*key = pair->key;
|
||||||
|
}
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
*value = pair->value;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
this->current->destroy(this->current);
|
this->current->destroy(this->current);
|
||||||
|
|||||||
Reference in New Issue
Block a user