From 0eac1e43728da297db26027ca242f0fc2343fb4a Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 30 Jun 2016 11:01:22 -0400 Subject: [PATCH] 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 --- src/lib/ecore_wl2/ecore_wl2_input.c | 7 +++++-- 1 file 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 30573ea..3bef2f0 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); -- 2.7.4