提交 1b454314 编写于 作者: C Chris Toshok

it's valid to pass NULLs to g_hash_table_lookup_extended. don't crash if the user does.

上级 801321b2
......@@ -298,8 +298,10 @@ g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key, gpointer *ori
for (s = hash->table [hashcode]; s != NULL; s = s->next){
if ((*equal)(s->key, key)){
*orig_key = s->key;
*value = s->value;
if (orig_key)
*orig_key = s->key;
if (value)
*value = s->value;
return TRUE;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册