Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2018-03-07 23:18:16 +0300
committerJulian Eisel <eiseljulian@gmail.com>2018-03-07 23:18:16 +0300
commit8851460174a5603a0e51e856b00dfa212b0162b2 (patch)
tree63c8e0b4842d2c579a6746835c86712bd26bba4d /source/blender/windowmanager
parentc00b42b710a5067073fb2cdb3b8612d43979026e (diff)
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.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c6
1 files changed, 5 insertions, 1 deletions
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);
}