[Bf-blender-cvs] [ac2e10d47b3] blender2.8: Fix memory leak when using scroll-bars

Severin noreply at git.blender.org
Fri Jun 29 20:58:02 CEST 2018


Commit: ac2e10d47b38e944efab66781ed0a4f4d4c41588
Author: Severin
Date:   Fri Jun 29 20:54:44 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBac2e10d47b38e944efab66781ed0a4f4d4c41588

Fix memory leak when using scroll-bars

===================================================================

M	source/blender/editors/screen/screen_ops.c

===================================================================

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



More information about the Bf-blender-cvs mailing list