1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-01-15 15:41:54 +01:00
slackware-current/source/xfce/thunar/0001-Prevent-crash-when-loading-mount-point-emblem-1511.patch
Patrick J Volkerding a329c449e3 Sat Dec 28 20:23:57 UTC 2024
a/shadow-4.17.0-x86_64-1.txz:  Upgraded.
d/doxygen-1.13.0-x86_64-1.txz:  Upgraded.
l/PyQt-builder-1.17.1-x86_64-1.txz:  Upgraded.
xfce/thunar-4.20.0-x86_64-2.txz:  Rebuilt.
  [PATCH] Prevent crash when loading mount point emblem (#1511).
  Thanks to Panagiotis Nik.
extra/brltty/brltty-6.7-x86_64-5.txz:  Rebuilt.
  [PATCH] Tcl-8.6.15 has changed the TCL_PACKAGE_PATH delimiter from spaces
  to a colon.
  Thanks to Didier Spaier.
2024-12-28 22:10:34 +01:00

42 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