diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 5e58571cdbf..9c751da7b7b 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -227,7 +227,7 @@ static void wm_window_match_keep_current_wm( for (wmWindow *win = wm->windows.first; win; win = win->next) { WorkSpace *workspace; - BKE_workspace_layout_find_global(G.main, screen, &workspace); + BKE_workspace_layout_find_global(bmain, screen, &workspace); BKE_workspace_active_set(win->workspace_hook, workspace); win->scene = CTX_data_scene(C); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 38d51c2b1da..30f4e5981a1 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -232,7 +232,7 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) wm_ghostwindow_destroy(wm, win); - BKE_workspace_instance_hook_free(G.main, win->workspace_hook); + BKE_workspace_instance_hook_free(G_MAIN, win->workspace_hook); MEM_freeN(win->stereo3d_format); MEM_freeN(win); @@ -1236,7 +1236,7 @@ void wm_window_reset_drawable(void) { BLI_assert(BLI_thread_is_main()); BLI_assert(GPU_framebuffer_current_get() == 0); - wmWindowManager *wm = G.main->wm.first; + wmWindowManager *wm = G_MAIN->wm.first; if (wm == NULL) return; diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c index 5634a1a3ee7..d6eb110dca0 100644 --- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c @@ -92,7 +92,7 @@ static wmManipulator *wm_manipulator_create( IDPropertyTemplate val = {0}; mpr->properties = IDP_New(IDP_GROUP, &val, "wmManipulatorProperties"); } - RNA_pointer_create(G.main->wm.first, wt->srna, mpr->properties, mpr->ptr); + RNA_pointer_create(G_MAIN->wm.first, wt->srna, mpr->properties, mpr->ptr); WM_manipulator_properties_sanitize(mpr->ptr, 0);