mirror of
git://slackware.nl/current.git
synced 2025-01-15 15:41:54 +01:00
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
|
From 373a5e67cdfbd05368980c714ee183148524cd26 Mon Sep 17 00:00:00 2001
|
||
|
From: Theo Linkspfeifer <lastonestanding@tutanota.com>
|
||
|
Date: Wed, 18 Dec 2024 13:34:13 +0100
|
||
|
Subject: [PATCH] Prevent crash when loading mount point emblem (#1511)
|
||
|
|
||
|
Fixes: 021975aa
|
||
|
---
|
||
|
thunar/thunar-file.c | 16 +++++++++++-----
|
||
|
1 file changed, 11 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
|
||
|
index 3d4e573b..c16b3928 100644
|
||
|
--- a/thunar/thunar-file.c
|
||
|
+++ b/thunar/thunar-file.c
|
||
|
@@ -3782,13 +3782,19 @@ thunar_file_get_emblem_names (ThunarFile *file)
|
||
|
GMount *mount = g_file_find_enclosing_mount (file->gfile, NULL, NULL);
|
||
|
if (mount != NULL)
|
||
|
{
|
||
|
- GIcon *icon = g_mount_get_icon (mount);
|
||
|
- const gchar *icon_name = g_themed_icon_get_names (G_THEMED_ICON (icon))[0];
|
||
|
+ GIcon *icon = g_mount_get_icon (mount);
|
||
|
+ if (icon != NULL)
|
||
|
+ {
|
||
|
+ if (G_IS_THEMED_ICON (icon))
|
||
|
+ {
|
||
|
+ const gchar *icon_name = g_themed_icon_get_names (G_THEMED_ICON (icon))[0];
|
||
|
|
||
|
- if (icon_name != NULL)
|
||
|
- emblems = g_list_prepend (emblems, g_strdup (icon_name));
|
||
|
+ if (icon_name != NULL)
|
||
|
+ emblems = g_list_prepend (emblems, g_strdup (icon_name));
|
||
|
+ }
|
||
|
|
||
|
- g_object_unref (icon);
|
||
|
+ g_object_unref (icon);
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.47.1
|
||
|
|