summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2020-03-09 09:03:58 -0400
committerChristopher Michael <devilhorns@comcast.net>2020-03-09 09:03:58 -0400
commit3f4940849312dfebc2ddfa5699558b21ead55191 (patch)
tree47d7e17ca3d0bf043e9296c49f5d4f72e296d950 /src
parentf2f170c1b3bef4383b6f3f8d3a50c81536ca8135 (diff)
efl_ui_win: Fix null pointer dereference
Fixes Coverity CID1420329 and CID1420328
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_win.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 2781729c32..c3be9a2e46 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -9428,14 +9428,20 @@ _drop_event_unregister(Eo *obj)
9428void 9428void
9429_selection_changed_event_register(Eo *obj) 9429_selection_changed_event_register(Eo *obj)
9430{ 9430{
9431 Efl_Ui_Win_Data *pd = efl_data_scope_safe_get(efl_provider_find(obj, MY_CLASS), MY_CLASS); 9431 Efl_Ui_Win_Data *pd;
9432
9433 pd = efl_data_scope_safe_get(efl_provider_find(obj, MY_CLASS), MY_CLASS);
9434 if (!pd) return;
9432 9435
9433 eina_array_push(pd->selection_changed, obj); 9436 eina_array_push(pd->selection_changed, obj);
9434} 9437}
9435void 9438void
9436_selection_changed_event_unregister(Eo *obj) 9439_selection_changed_event_unregister(Eo *obj)
9437{ 9440{
9438 Efl_Ui_Win_Data *pd = efl_data_scope_safe_get(efl_provider_find(obj, MY_CLASS), MY_CLASS); 9441 Efl_Ui_Win_Data *pd;
9442
9443 pd = efl_data_scope_safe_get(efl_provider_find(obj, MY_CLASS), MY_CLASS);
9444 if (!pd) return;
9439 9445
9440 eina_array_remove(pd->selection_changed, _remove, obj); 9446 eina_array_remove(pd->selection_changed, _remove, obj);
9441} 9447}