Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2016-10-17 20:25:56 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-10-17 20:28:09 +0300
commit4811b2d3565cf72a08d8bc55d1717e71d18f7df1 (patch)
tree0a8337eb2796afd08bdc2edf7822d1ea05912394 /source/blender/windowmanager/manipulators
parente7fddc077297f2f722b6eb8350ac2115f7f4a685 (diff)
Proper fix for crash when joining areas that doesn't break manipulators
Turns out CTX_wm_region returns mostly NULL in wm_manipulatormaps_handled_modal_update. Now propertly unsetting area/region data of handlers when deleting area/region.
Diffstat (limited to 'source/blender/windowmanager/manipulators')
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
index eada6e3a126..500092f5f2d 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
@@ -394,12 +394,10 @@ 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 or when joining areas */
- if (!region || !region->manipulator_map)
+ if (!handler->op_region || !handler->op_region->manipulator_map)
return;
/* hide operator manipulators */
@@ -407,8 +405,10 @@ void wm_manipulatormaps_handled_modal_update(
ot->mgrouptype->op = NULL;
}
- wmManipulatorMap *mmap = region->manipulator_map;
+ wmManipulatorMap *mmap = handler->op_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);