diff --git a/gio/xdgmime/xdgmime.c b/gio/xdgmime/xdgmime.c index 2446d3813..9bb93f791 100644 --- a/gio/xdgmime/xdgmime.c +++ b/gio/xdgmime/xdgmime.c @@ -531,7 +531,8 @@ xdg_mime_get_mime_type_for_data (const void *data, if (len == 0) { - *result_prio = 100; + if (result_prio != NULL) + *result_prio = 100; return XDG_MIME_TYPE_EMPTY; }