[Bf-blender-cvs] [196654a] blender2.8: Fix crash when joining areas (caused by manipulators)
Julian Eisel
noreply at git.blender.org
Sun Oct 16 19:34:04 CEST 2016
Commit: 196654ad0887e4c1fbce6f17a30cc0866af3262e
Author: Julian Eisel
Date: Sun Oct 16 19:28:12 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB196654ad0887e4c1fbce6f17a30cc0866af3262e
Fix crash when joining areas (caused by manipulators)
Manipulator code tried to access the removed region from handler->op_region. Use context region now.
===================================================================
M source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
===================================================================
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
index 20f2df1..eada6e3 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
@@ -394,10 +394,12 @@ void wm_manipulatormaps_handled_modal_update(
bContext *C, wmEvent *event, wmEventHandler *handler,
const wmOperatorType *ot)
{
+ ScrArea *area = CTX_wm_area(C);
+ ARegion *region = CTX_wm_region(C);
const bool modal_running = (handler->op != NULL);
- /* happens on render */
- if (!handler->op_region || !handler->op_region->manipulator_map)
+ /* happens on render or when joining areas */
+ if (!region || !region->manipulator_map)
return;
/* hide operator manipulators */
@@ -405,10 +407,8 @@ void wm_manipulatormaps_handled_modal_update(
ot->mgrouptype->op = NULL;
}
- wmManipulatorMap *mmap = handler->op_region->manipulator_map;
+ wmManipulatorMap *mmap = region->manipulator_map;
wmManipulator *manipulator = wm_manipulatormap_get_active_manipulator(mmap);
- ScrArea *area = CTX_wm_area(C);
- ARegion *region = CTX_wm_region(C);
wm_manipulatormap_handler_context(C, handler);
More information about the Bf-blender-cvs
mailing list