Commit fc19c949 authored by Bastien Nocera's avatar Bastien Nocera

thumbnail: Fix runtime warning getting a preview icon

If we tried to get a preview thumbnail for a file, but that preview icon
did not exist, then we'd generate a warning trying to add a reference to
that GIcon.

Fixes: e629e46a
parent e83305b9
Pipeline #54664 passed with stage
in 3 minutes and 2 seconds
......@@ -967,8 +967,10 @@ get_preview_thumbnail (const char *uri,
if (file_info == NULL)
return NULL;
object = g_object_ref (g_file_info_get_attribute_object (file_info,
G_FILE_ATTRIBUTE_PREVIEW_ICON));
object = g_file_info_get_attribute_object (file_info,
G_FILE_ATTRIBUTE_PREVIEW_ICON);
if (object)
g_object_ref (object);
g_object_unref (file_info);
if (!object)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment