devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0eac1e43728da297db26027ca242f0fc2343fb4a

commit 0eac1e43728da297db26027ca242f0fc2343fb4a
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Thu Jun 30 11:01:22 2016 -0400

    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 <cpmich...@osg.samsung.com>
---
 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);
 

-- 


Reply via email to