diff options
author | Severin <eiseljulian@gmail.com> | 2018-06-29 21:54:44 +0300 |
---|---|---|
committer | Severin <eiseljulian@gmail.com> | 2018-06-29 21:57:43 +0300 |
commit | ac2e10d47b38e944efab66781ed0a4f4d4c41588 (patch) | |
tree | b639f30d2295ff1204fa2dff337fe974849a598a | |
parent | 9b6aed845a29cb0f8f63ede70bfa398b2849adeb (diff) |
Fix memory leak when using scroll-bars
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index ac32489ad15..35608a1f303 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -844,8 +844,8 @@ static int actionzone_invoke(bContext *C, wmOperator *op, const wmEvent *event) AZone *az = ED_area_actionzone_find_xy(sa, &event->x); sActionzoneData *sad; - /* quick escape */ - if (az == NULL) + /* quick escape - Scroll azones only hide/unhide the scroll-bars, they have their own handling. */ + if (az == NULL || ELEM(az->type, AZONE_REGION_SCROLL)) return OPERATOR_PASS_THROUGH; /* ok we do the actionzone */ @@ -860,9 +860,6 @@ static int actionzone_invoke(bContext *C, wmOperator *op, const wmEvent *event) actionzone_exit(op); return OPERATOR_FINISHED; } - else if (ELEM(sad->az->type, AZONE_REGION_SCROLL)) { - return OPERATOR_PASS_THROUGH; - } else { /* add modal handler */ WM_event_add_modal_handler(C, op); |