diff options
| author | Victor Kareh <[email protected]> | 2026-02-11 16:10:38 -0500 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-02-11 16:10:38 -0500 |
| commit | 92146417a281706d2312912c0d76c5da96ef16ea (patch) | |
| tree | 3c547144b7ca77864fca4d756a4ec6bcb4c97fe7 /src/eom-list-store.c | |
| parent | 034677b0c5bf9b37c22a6d2d52f8761c2364857d (diff) | |
| download | eom-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-list-store.c')
| -rw-r--r-- | src/eom-list-store.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eom-list-store.c b/src/eom-list-store.c index 9336614..ae7f83b 100644 --- a/src/eom-list-store.c +++ b/src/eom-list-store.c @@ -477,7 +477,8 @@ directory_visit (GFile *directory, if (!g_str_has_prefix (name, ".")) { /* We support opening any image type, so let eom to add any images in the current directory to the store */ - if (g_content_type_is_mime_type (mime_type, "image/*") || eom_image_is_supported_mime_type (mime_type)) { + if (mime_type != NULL && + (g_content_type_is_mime_type (mime_type, "image/*") || eom_image_is_supported_mime_type (mime_type))) { load_uri = TRUE; } } |
