Make g_simple_async_result_is_valid work without source

The problem was pointed out by Xavier Claessens in bug 626208.
This commit is contained in:
Matthias Clasen 2010-08-07 17:08:54 -04:00
parent 402ad1958c
commit 7de6658f74

View File

@ -757,10 +757,12 @@ g_simple_async_result_is_valid (GAsyncResult *result,
cmp_source = g_async_result_get_source_object (result);
if (cmp_source != source)
{
g_object_unref (cmp_source);
if (cmp_source != NULL)
g_object_unref (cmp_source);
return FALSE;
}
g_object_unref (cmp_source);
if (cmp_source != NULL)
g_object_unref (cmp_source);
return source_tag == g_simple_async_result_get_source_tag (simple);
}