Merge branch 'master' into blender2.8
[blender.git] / source / creator / creator_signals.c
index 55f9777f55ae05815a867d9f4bbee49e8c714ad5..44c93d2c615996c8ad51aa8d3e46a48fe922bf09 100644 (file)
@@ -110,7 +110,7 @@ static void sig_handle_crash_backtrace(FILE *fp)
 
 static void sig_handle_crash(int signum)
 {
-       wmWindowManager *wm = G.main->wm.first;
+       wmWindowManager *wm = G_MAIN->wm.first;
 
 #ifdef USE_WRITE_CRASH_BLEND
        if (wm->undo_stack) {
@@ -118,11 +118,11 @@ static void sig_handle_crash(int signum)
                if (memfile) {
                        char fname[FILE_MAX];
 
-                       if (!G.main->name[0]) {
+                       if (!G_MAIN->name[0]) {
                                BLI_make_file_string("/", fname, BKE_tempdir_base(), "crash.blend");
                        }
                        else {
-                               BLI_strncpy(fname, G.main->name, sizeof(fname));
+                               BLI_strncpy(fname, G_MAIN->name, sizeof(fname));
                                BLI_replace_extension(fname, sizeof(fname), ".crash.blend");
                        }
 
@@ -139,11 +139,11 @@ static void sig_handle_crash(int signum)
 
        char fname[FILE_MAX];
 
-       if (!G.main->name[0]) {
+       if (!G_MAIN->name[0]) {
                BLI_join_dirfile(fname, sizeof(fname), BKE_tempdir_base(), "blender.crash.txt");
        }
        else {
-               BLI_join_dirfile(fname, sizeof(fname), BKE_tempdir_base(), BLI_path_basename(G.main->name));
+               BLI_join_dirfile(fname, sizeof(fname), BKE_tempdir_base(), BLI_path_basename(G_MAIN->name));
                BLI_replace_extension(fname, sizeof(fname), ".crash.txt");
        }