[Bf-blender-cvs] [153c144053c] master: Fix T64339: Crash with UV sculpt after undo
Campbell Barton
noreply at git.blender.org
Tue May 14 09:05:12 CEST 2019
Commit: 153c144053cc1e51ca2564e8ac61271ab39d6716
Author: Campbell Barton
Date: Tue May 14 16:44:21 2019 +1000
Branches: master
https://developer.blender.org/rB153c144053cc1e51ca2564e8ac61271ab39d6716
Fix T64339: Crash with UV sculpt after undo
===================================================================
M source/blender/windowmanager/intern/wm_toolsystem.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index f429415bee9..773f02e2591 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -549,6 +549,7 @@ bool WM_toolsystem_key_from_context(ViewLayer *view_layer, ScrArea *sa, bToolKey
void WM_toolsystem_refresh_active(bContext *C)
{
Main *bmain = CTX_data_main(C);
+ BKE_main_id_tag_idcode(bmain, ID_WS, LIB_TAG_DOIT, false);
for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
for (wmWindow *win = wm->windows.first; win; win = win->next) {
WorkSpace *workspace = WM_window_get_active_workspace(win);
@@ -572,6 +573,14 @@ void WM_toolsystem_refresh_active(bContext *C)
}
}
}
+
+ if ((workspace->id.tag & LIB_TAG_DOIT) == 0) {
+ workspace->id.tag |= LIB_TAG_DOIT;
+ /* Refresh to ensure data is initialized, see: T64339. */
+ for (bToolRef *tref = workspace->tools.first; tref; tref = tref->next) {
+ toolsystem_refresh_ref(C, workspace, tref);
+ }
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list