diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-06 16:50:24 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 12:11:46 +0300 |
commit | 54f9cd52835bdd96cdd01cf643cfccf8a229c04b (patch) | |
tree | 95095d556c91743b9012387726fbdccc61f38c00 /source/blender/windowmanager/intern/wm_window.c | |
parent | 409cfba1a3cdec228c7f93aa8c1fbc912a6d6525 (diff) |
Cleanup: Nuke moar G.main usages...
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index c7805184819..b28f845caf5 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -249,6 +249,7 @@ wmWindow *wm_window_new(bContext *C) /* part of wm_window.c api */ wmWindow *wm_window_copy(bContext *C, wmWindow *win_src) { + Main *bmain = CTX_data_main(C); wmWindow *win_dst = wm_window_new(C); win_dst->posx = win_src->posx + 10; @@ -257,7 +258,7 @@ wmWindow *wm_window_copy(bContext *C, wmWindow *win_src) win_dst->sizey = win_src->sizey; /* duplicate assigns to window */ - win_dst->screen = ED_screen_duplicate(win_dst, win_src->screen); + win_dst->screen = ED_screen_duplicate(bmain, win_dst, win_src->screen); BLI_strncpy(win_dst->screenname, win_dst->screen->id.name + 2, sizeof(win_dst->screenname)); win_dst->screen->winid = win_dst->winid; @@ -793,6 +794,7 @@ wmWindow *WM_window_open(bContext *C, const rcti *rect) */ wmWindow *WM_window_open_temp(bContext *C, int x, int y, int sizex, int sizey, int type) { + Main *bmain = CTX_data_main(C); wmWindow *win_prev = CTX_wm_window(C); wmWindow *win; ScrArea *sa; @@ -839,7 +841,7 @@ wmWindow *WM_window_open_temp(bContext *C, int x, int y, int sizex, int sizey, i if (win->screen == NULL) { /* add new screen */ - win->screen = ED_screen_add(win, scene, "temp"); + win->screen = ED_screen_add(bmain, win, scene, "temp"); } else { /* switch scene for rendering */ |