GNOME Bugzilla – Bug 721458
g_simple_async_result_is_valid has a NULL check for the wrong source_tag
Last modified: 2014-02-16 14:28:08 UTC
If g_simple_async_report_error_in_idle() is used, the source_tag of the result is NULL. If you then pass in the _async function as the source_tag (as done in the example in the documentation) into g_simple_async_result_is_valid(), it returns FALSE because the following line fails: return source_tag == NULL || source_tag == g_simple_async_result_get_source_tag (simple); I think the NULL check should instead be done on g_simple_async_result_get_source_tag (simple) and the documentation should be updated. This problem came up in gvfs: https://bugzilla.gnome.org/show_bug.cgi?id=720743#c3 Thanks
I think that is right
I pushed a fix to allow either the result's source tag or the passed-in source tag to be NULL; just switching the check from one to the other seemed like it would probably break some existing code.