diff options
author | Pablo Barciela <[email protected]> | 2019-03-18 11:40:26 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-03-25 21:10:33 +0100 |
commit | bc41274dad99d0c6700efac3dd747c282ed4f7d6 (patch) | |
tree | 323cfddf7363cda012be15a321521afab11b6c73 | |
parent | a4a8e89c52d81aef7072fd3a7c3516a7113562ea (diff) | |
download | mate-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));
^~~~~~~~~~~~
-rw-r--r-- | libmate-desktop/mate-desktop-thumbnail.c | 2 |
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, |