summaryrefslogtreecommitdiff
path: root/src/eom-metadata-sidebar.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-02-11 16:10:38 -0500
committerVictor Kareh <[email protected]>2026-02-11 16:10:38 -0500
commit92146417a281706d2312912c0d76c5da96ef16ea (patch)
tree3c547144b7ca77864fca4d756a4ec6bcb4c97fe7 /src/eom-metadata-sidebar.c
parent034677b0c5bf9b37c22a6d2d52f8761c2364857d (diff)
downloadeom-add-null-checks-when-missing-attributes.tar.bz2
eom-add-null-checks-when-missing-attributes.tar.xz
Add null checks for content type with remote filesadd-null-checks-when-missing-attributes
Adds NULL checks when content-type attributes are missing from GVFS backends. This prevents a crash when opening images from remote filesystems where both standard and fast content-type attributes are missing. Fixes #366
Diffstat (limited to 'src/eom-metadata-sidebar.c')
-rw-r--r--src/eom-metadata-sidebar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eom-metadata-sidebar.c b/src/eom-metadata-sidebar.c
index 2dbde74..9d70b0a 100644
--- a/src/eom-metadata-sidebar.c
+++ b/src/eom-metadata-sidebar.c
@@ -167,7 +167,11 @@ eom_metadata_sidebar_update_general_section (EomMetadataSidebar *sidebar)
const gchar *mime_str;
mime_str = eom_util_get_content_type_with_fallback (file_info);
- str = g_content_type_get_description (mime_str);
+ if (mime_str != NULL) {
+ str = g_content_type_get_description (mime_str);
+ } else {
+ str = g_strdup (_("Unknown"));
+ }
g_object_unref (file_info);
}
gtk_label_set_text (GTK_LABEL (priv->type_label), str);