summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-desktop-thumbnail.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-03-18 11:40:26 +0100
committerZenWalker <[email protected]>2019-03-25 21:10:33 +0100
commitbc41274dad99d0c6700efac3dd747c282ed4f7d6 (patch)
tree323cfddf7363cda012be15a321521afab11b6c73 /libmate-desktop/mate-desktop-thumbnail.c
parenta4a8e89c52d81aef7072fd3a7c3516a7113562ea (diff)
downloadmate-desktop-bc41274dad99d0c6700efac3dd747c282ed4f7d6.tar.bz2
mate-desktop-bc41274dad99d0c6700efac3dd747c282ed4f7d6.tar.xz
mate-desktop-thumbnail: avoid 'NULL' parameter
Fixes Clang static analyzer warning: mate-desktop-thumbnail.c:933:54: warning: Null pointer passed as an argument to a 'nonnull' parameter g_checksum_update (checksum, (const guchar *) uri, strlen (uri)); ^~~~~~~~~~~~
Diffstat (limited to 'libmate-desktop/mate-desktop-thumbnail.c')
-rw-r--r--libmate-desktop/mate-desktop-thumbnail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmate-desktop/mate-desktop-thumbnail.c b/libmate-desktop/mate-desktop-thumbnail.c
index 4ef0b52..2d718e7 100644
--- a/libmate-desktop/mate-desktop-thumbnail.c
+++ b/libmate-desktop/mate-desktop-thumbnail.c
@@ -1074,7 +1074,7 @@ mate_desktop_thumbnail_factory_can_thumbnail (MateDesktopThumbnailFactory *facto
}
g_mutex_unlock (&factory->priv->lock);
- if (have_script || mimetype_supported_by_gdk_pixbuf (mime_type))
+ if (uri && (have_script || mimetype_supported_by_gdk_pixbuf (mime_type)))
{
return !mate_desktop_thumbnail_factory_has_valid_failed_thumbnail (factory,
uri,