diff options
-rw-r--r-- | libcaja-private/caja-file.c | 13 | ||||
-rw-r--r-- | src/file-manager/fm-icon-view.c | 3 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c index 85f8a9ce..fa00ac8c 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -4324,12 +4324,13 @@ caja_file_get_icon (CajaFile *file, /* Render frames only for thumbnails of non-image files and for images with no alpha channel. */ - gboolean is_image = strncmp(eel_ref_str_peek (file->details->mime_type), "image/", 6) == 0; - if (!is_image || - is_image && !gdk_pixbuf_get_has_alpha (raw_pixbuf)) { - caja_ui_frame_image (&scaled_pixbuf); - } - + gboolean is_image = file->details->mime_type && + (strncmp(eel_ref_str_peek (file->details->mime_type), "image/", 6) == 0); + if (!is_image || + is_image && !gdk_pixbuf_get_has_alpha (raw_pixbuf)) { + caja_ui_frame_image (&scaled_pixbuf); + } + g_object_unref (raw_pixbuf); /* Don't scale up if more than 25%, then read the original diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 888db702..6ab19c4e 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -2639,12 +2639,11 @@ fm_icon_view_icon_text_changed_callback (CajaIconContainer *container, FMIconView *icon_view) { g_assert (CAJA_IS_FILE (file)); - g_assert (new_name != NULL); /* Don't allow a rename with an empty string. Revert to original * without notifying the user. */ - if (new_name[0] == '\0') + if ((new_name == NULL) || (new_name[0] == '\0')) { return; } |