[Xfce4-commits] [xfce/thunar] 01/06: Don't try to load menu providers if current dir is invalid
    noreply at xfce.org 
    noreply at xfce.org
       
    Wed Jul 18 22:07:29 CEST 2018
    
    
  
This is an automated email from the git hooks/post-receive script.
a   l   e   x       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 f0b9cfaf5ff3524fa21fc5d622f8e595cab336e1
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sat Jul 14 19:18:42 2018 -0300
    Don't try to load menu providers if current dir is invalid
---
 thunar/thunar-window.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 6db84bf..ebe50af 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -3443,14 +3443,18 @@ thunar_window_update_custom_actions (ThunarView   *view,
       || window->view != GTK_WIDGET (view))
     return;
 
+  /* grab a reference to the current directory of the window */
+  folder = thunar_window_get_current_directory (window);
+
+  /* leave if current directory is invalid */
+  if (!thunarx_file_info_is_directory (THUNARX_FILE_INFO (folder)))
+      return;
+
   /* load the menu provides from the provider factory */
   providers = thunarx_provider_factory_list_providers (window->provider_factory,
                                                        THUNARX_TYPE_MENU_PROVIDER);
   if (G_LIKELY (providers != NULL))
     {
-      /* grab a reference to the current directory of the window */
-      folder = thunar_window_get_current_directory (window);
-
       /* get a list of selected files */
       selected_files = thunar_component_get_selected_files (THUNAR_COMPONENT (view));
 
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the Xfce4-commits
mailing list