From 8851460174a5603a0e51e856b00dfa212b0162b2 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 7 Mar 2018 21:18:16 +0100 Subject: Proper fix for User Preferences window crash Reverts rBb9ae517794765d6a1660 and fixes the issue properly. Old fix could cause NULL to be passed to functions that expect all arguments to be non-NULL. --- source/blender/windowmanager/intern/wm_window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index d9a3f4f9bde..7fef86c006e 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -766,7 +766,11 @@ wmWindow *WM_window_open_temp(bContext *C, int x, int y, int sizex, int sizey, i WM_window_set_active_layout(win, workspace, layout); } - if (WM_window_get_active_scene(win) != scene) { + if (win->scene == NULL) { + win->scene = scene; + } + /* In case we reuse an already existing temp window (see win lookup above). */ + else if (WM_window_get_active_scene(win) != scene) { WM_window_change_active_scene(bmain, C, win, scene); } -- cgit v1.2.3