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-05-06 13:37:18 -0400
commit36f011e8138655675e43f29c4e21b79dfc7c8e4b (patch)
tree71db6282117463db5c59c09308715ed402904947 /src/eom-metadata-sidebar.c
parentf6b1fbae5a68141e1075bd88c9dbd421d426ee60 (diff)
downloadeom-36f011e8138655675e43f29c4e21b79dfc7c8e4b.tar.bz2
eom-36f011e8138655675e43f29c4e21b79dfc7c8e4b.tar.xz
Add null checks for content type with remote filesHEADmaster
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);