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>
This commit is contained in:
Chris Michael 2016-06-30 11:01:22 -04:00
parent dce25efef4
commit 0eac1e4372
1 changed files with 5 additions and 2 deletions

View File

@ -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);