summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-11-15 10:42:33 +0000
committerChris Michael <cp.michael@samsung.com>2013-11-15 10:42:33 +0000
commit31eda6e249af6d37e6af1c5bb47306a5fd62ed45 (patch)
treeb3de809c3a7faec828126f13305f44bc324fc4a7
parentfdc9b5229917b7febfcbf6465a365c279d3d5e62 (diff)
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 <cp.michael@samsung.com>
-rw-r--r--src/bin/e_widget_fsel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/e_widget_fsel.c b/src/bin/e_widget_fsel.c
index e92a388de..a4fe5eb15 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)
499 E_Widget_Data *wd; 499 E_Widget_Data *wd;
500 500
501 if (!obj) return; 501 if (!obj) return;
502 wd = e_widget_data_get(obj); 502 if (!(wd = e_widget_data_get(obj))) return;
503 e_fm2_path_get(wd->o_files_fm, dev, path); 503 e_fm2_path_get(wd->o_files_fm, dev, path);
504} 504}
505 505
@@ -511,7 +511,7 @@ e_widget_fsel_selection_path_get(Evas_Object *obj)
511 char buf[PATH_MAX]; 511 char buf[PATH_MAX];
512 512
513 if (!obj) return NULL; 513 if (!obj) return NULL;
514 wd = e_widget_data_get(obj); 514 if (!(wd = e_widget_data_get(obj))) return NULL;
515 if (wd->fprev) return wd->path; 515 if (wd->fprev) return wd->path;
516 s = e_widget_entry_text_get(wd->o_entry); 516 s = e_widget_entry_text_get(wd->o_entry);
517 dir = e_fm2_real_path_get(wd->o_files_fm); 517 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)
537 E_Widget_Data *wd; 537 E_Widget_Data *wd;
538 538
539 if (!obj) return; 539 if (!obj) return;
540 wd = e_widget_data_get(obj); 540 if (!(wd = e_widget_data_get(obj))) return;
541 e_fm2_window_object_set(wd->o_favorites_fm, eobj); 541 e_fm2_window_object_set(wd->o_favorites_fm, eobj);
542 e_fm2_window_object_set(wd->o_files_fm, eobj); 542 e_fm2_window_object_set(wd->o_files_fm, eobj);
543} 543}
@@ -564,4 +564,3 @@ _e_wid_del_hook(Evas_Object *obj)
564 564
565 free(wd); 565 free(wd);
566} 566}
567