Skip to content

Commit

Permalink
fix a null pointer deref scan-build found
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSwirlz authored and mtwebster committed Nov 1, 2022
1 parent 27c8b4a commit 92d13a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcinnamon-desktop/gnome-desktop-thumbnail.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ create_loader (GFile *file,
loader = gdk_pixbuf_loader_new_with_mime_type (mime_type, &error);
}

if (loader == NULL) {
if (loader == NULL && error != NULL) {
g_warning ("Unable to create loader for mime type %s: %s", mime_type, error->message);
g_clear_error (&error);
loader = gdk_pixbuf_loader_new ();
Expand Down

0 comments on commit 92d13a8

Please sign in to comment.