Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / util / ed_util.c
index a829f8c11442b6abae45acf7da667752726072be..549b9b7de77ebf9e679093c2a58ef2f10d075694 100644 (file)
@@ -145,8 +145,8 @@ void ED_editors_exit(bContext *C)
                return;
 
        /* frees all editmode undos */
-       if (G.main->wm.first) {
-               wmWindowManager *wm = G.main->wm.first;
+       if (G_MAIN->wm.first) {
+               wmWindowManager *wm = G_MAIN->wm.first;
                /* normally we don't check for NULL undo stack, do here since it may run in different context. */
                if (wm->undo_stack) {
                        BKE_undosys_stack_destroy(wm->undo_stack);