discomfitor pushed a commit to branch master.

commit 4628c3b6dc68546f7b0c3b6c35b8569a06942e0a
Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Jun 10 10:16:52 2013 +0100

    only call app menu scan functions when passing a menu
    
    klocwork issue
---
 src/bin/e_int_menus.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c
index 6a3badd..6e9774f 100644
--- a/src/bin/e_int_menus.c
+++ b/src/bin/e_int_menus.c
@@ -883,12 +883,15 @@ _e_int_menus_apps_thread_new(E_Menu *m, const char *dir)
      ecore_timer_reset(_e_int_menus_app_cleaner); 
    else
      _e_int_menus_app_cleaner = ecore_timer_add(300, 
_e_int_menus_app_cleaner_cb, NULL);
-   eina_stringshare_del(dir);  
-   _e_int_menus_apps_scan(m, menu);           
-   e_menu_pre_activate_callback_set(m, NULL, NULL);   
-   e_object_data_set(E_OBJECT(m), menu);   
-   e_object_free_attach_func_set(E_OBJECT(m),        
-                                _e_int_menus_apps_free_hook2);
+   eina_stringshare_del(dir);
+   if (m)
+     {
+        _e_int_menus_apps_scan(m, menu);           
+        e_menu_pre_activate_callback_set(m, NULL, NULL);   
+        e_object_data_set(E_OBJECT(m), menu);   
+        e_object_free_attach_func_set(E_OBJECT(m),        
+          _e_int_menus_apps_free_hook2);
+     }
 
    if (!e_config->menu_apps_show) goto on_end;
 

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to