aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-06-30 11:01:22 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-06-30 11:01:22 -0400
commit0eac1e43728da297db26027ca242f0fc2343fb4a (patch)
tree34774bc55f353f192eb512cf81e9862355a76837 /src/lib/ecore_wl2
parentelementary: Fix explicit null dereference (diff)
downloadefl-0eac1e43728da297db26027ca242f0fc2343fb4a.tar.gz
ecore-wl2: Fix derefence after null check
'window' here could potentially be null so we should be checking that it is valid before trying to assign event window Fixes Coverity CID1357148 @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 30573eafcc..3bef2f0482 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -250,8 +250,11 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
ev->multi.root.x = input->pointer.sx;
ev->multi.root.y = input->pointer.sy;
- ev->window = window->id;
- ev->event_window = window->id;
+ if (window)
+ {
+ ev->window = window->id;
+ ev->event_window = window->id;
+ }
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);