diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-07 21:41:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-07 21:41:10 +0300 |
commit | cfc4805455bc03f5f810d0d234880727284e93cf (patch) | |
tree | 4739036dbf710d53389ef98b611e9c8e1e3d361e /source/blender/windowmanager/intern/wm_event_system.c | |
parent | 18e316bcb9f4aa7221f82a40fd3307cde7eaffbb (diff) | |
parent | 8f49299134b504a59558aad8e66a81ae3c6c9748 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 02c585fc677..fdca1d96b4b 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2557,9 +2557,14 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) /* eventstate stores if previous event was a KM_PRESS, in case that * wasn't handled, the KM_RELEASE will become a KM_CLICK */ - if (win && event->val == KM_PRESS) { - win->eventstate->check_click = true; - win->eventstate->check_drag = true; + if (win != NULL) { + if (event->val == KM_PRESS) { + win->eventstate->check_click = true; + win->eventstate->check_drag = true; + } + else if (event->val == KM_RELEASE) { + win->eventstate->check_drag = false; + } } if (win && win->eventstate->prevtype == event->type) { |