Fix T58670: Spin tool crashes w/o gizmo overlay
authorCampbell Barton <ideasman42@gmail.com>
Tue, 4 Dec 2018 02:00:10 +0000 (13:00 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 4 Dec 2018 02:00:10 +0000 (13:00 +1100)
source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c

index ec8e012b1a78bb7ad10f90552d01652ff557f95f..00ffc3de8610b086aca26f9964021401ace2b5bc 100644 (file)
@@ -1039,7 +1039,9 @@ void WM_gizmomap_message_subscribe(
         bContext *C, wmGizmoMap *gzmap, ARegion *ar, struct wmMsgBus *mbus)
 {
        for (wmGizmoGroup *gzgroup = gzmap->groups.first; gzgroup; gzgroup = gzgroup->next) {
-               if (!WM_gizmo_group_type_poll(C, gzgroup->type)) {
+               if ((gzgroup->init_flag & WM_GIZMOGROUP_INIT_SETUP) == 0 ||
+                   !WM_gizmo_group_type_poll(C, gzgroup->type))
+               {
                        continue;
                }
                for (wmGizmo *gz = gzgroup->gizmos.first; gz; gz = gz->next) {