From 92146417a281706d2312912c0d76c5da96ef16ea Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Wed, 11 Feb 2026 16:10:38 -0500 Subject: Add null checks for content type with remote files 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 --- src/eom-properties-dialog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/eom-properties-dialog.c') diff --git a/src/eom-properties-dialog.c b/src/eom-properties-dialog.c index 480b3f7..5c13261 100644 --- a/src/eom-properties-dialog.c +++ b/src/eom-properties-dialog.c @@ -180,7 +180,11 @@ pd_update_general_tab (EomPropertiesDialog *prop_dlg, type_str = g_strdup (_("Unknown")); } else { mime_str = eom_util_get_content_type_with_fallback (file_info); - type_str = g_content_type_get_description (mime_str); + if (mime_str != NULL) { + type_str = g_content_type_get_description (mime_str); + } else { + type_str = g_strdup (_("Unknown")); + } g_object_unref (file_info); } -- cgit v1.2.1