xdgmime: Don’t set an out argument if it’s NULL

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1729
This commit is contained in:
Philip Withnall 2019-03-19 11:16:39 +00:00
parent d586ab4c73
commit 4a0cb8f3a1

View File

@ -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;
}