diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-28 09:39:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-28 09:39:05 +0400 |
commit | aa9ffc0bc28d86eb91b69584903e52da67e86b28 (patch) | |
tree | e4c3a4b14ac6b0fb2eed80ea985a54be13953799 /source/blender/editors/screen/screen_ops.c | |
parent | 6d400423f983705aa6727c3da6e0331a8c281cef (diff) |
avoid crashes running screendump and screen editing operators in background mode. (not that these would be useful but better not crash)
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f4172d4ec80..c70841ffe82 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -599,13 +599,12 @@ static int actionzone_area_poll(bContext *C) wmWindow *win = CTX_wm_window(C); ScrArea *sa = CTX_wm_area(C); - if (sa && win) { + if (sa && win && win->eventstate) { + const int *xy = &win->eventstate->x; AZone *az; - int x = win->eventstate->x; - int y = win->eventstate->y; for (az = sa->actionzones.first; az; az = az->next) - if (BLI_rcti_isect_pt(&az->rect, x, y)) + if (BLI_rcti_isect_pt_v(&az->rect, xy)) return 1; } return 0; |