summaryrefslogtreecommitdiff
path: root/src/eom-properties-dialog.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-properties-dialog.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-properties-dialog.c')
-rw-r--r--src/eom-properties-dialog.c6
1 files changed, 5 insertions, 1 deletions
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);
}