devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=31eda6e249af6d37e6af1c5bb47306a5fd62ed45

commit 31eda6e249af6d37e6af1c5bb47306a5fd62ed45
Author: Chris Michael <[email protected]>
Date:   Fri Nov 15 10:42:33 2013 +0000

    e_widget_data_get Can return NULL so we should check that else we
    could potentially crash the entire window manager (for a potentially
    bad module).
    
    Fixes Phab Ticket T491
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/bin/e_widget_fsel.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_widget_fsel.c b/src/bin/e_widget_fsel.c
index e92a388..a4fe5eb 100644
--- a/src/bin/e_widget_fsel.c
+++ b/src/bin/e_widget_fsel.c
@@ -499,7 +499,7 @@ e_widget_fsel_path_get(Evas_Object *obj, const char **dev, 
const char **path)
    E_Widget_Data *wd;
 
    if (!obj) return;
-   wd = e_widget_data_get(obj);
+   if (!(wd = e_widget_data_get(obj))) return;
    e_fm2_path_get(wd->o_files_fm, dev, path);
 }
 
@@ -511,7 +511,7 @@ e_widget_fsel_selection_path_get(Evas_Object *obj)
    char buf[PATH_MAX];
 
    if (!obj) return NULL;
-   wd = e_widget_data_get(obj);
+   if (!(wd = e_widget_data_get(obj))) return NULL;
    if (wd->fprev) return wd->path;
    s = e_widget_entry_text_get(wd->o_entry);
    dir = e_fm2_real_path_get(wd->o_files_fm);
@@ -537,7 +537,7 @@ e_widget_fsel_window_object_set(Evas_Object *obj, E_Object 
*eobj)
    E_Widget_Data *wd;
 
    if (!obj) return;
-   wd = e_widget_data_get(obj);
+   if (!(wd = e_widget_data_get(obj))) return;
    e_fm2_window_object_set(wd->o_favorites_fm, eobj);
    e_fm2_window_object_set(wd->o_files_fm, eobj);
 }
@@ -564,4 +564,3 @@ _e_wid_del_hook(Evas_Object *obj)
 
    free(wd);
 }
-

-- 


Reply via email to