[Xfce4-commits] [xfce/thunar] 01/01: Fix crash on unmounted volume in tree pane right click (Bug #15452)
noreply at xfce.org
noreply at xfce.org
Fri May 24 03:45:19 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 4
in repository xfce/thunar.
commit ba3502eaaf398ef5fac12dcc9d23fe47959c4eba
Author: Andre Miranda <andreldm at xfce.org>
Date: Thu May 23 22:41:28 2019 -0300
Fix crash on unmounted volume in tree pane right click (Bug #15452)
---
thunar/thunar-tree-view.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index 9752138..ceb117b 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -1360,7 +1360,11 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_widget_show (item);
}
- if (G_UNLIKELY (thunar_g_file_is_trash (thunar_file_get_file (file))))
+ if (G_UNLIKELY (file == NULL))
+ {
+ /* do nothing */
+ }
+ else if (G_UNLIKELY (thunar_g_file_is_trash (thunar_file_get_file (file))))
{
/* append the "Empty Trash" menu action */
item = gtk_menu_item_new_with_mnemonic (_("_Empty Trash"));
@@ -1374,7 +1378,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
}
- else if (G_LIKELY (file != NULL))
+ else
{
/* check if we have a non-trashed resource */
if (G_LIKELY (!thunar_file_is_trashed (file)))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list