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:
authorCampbell Barton <ideasman42@gmail.com>2015-10-06 16:27:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-06 16:36:39 +0300
commit84713629877d84d8c973d55e7e7cb0eca0f2ba49 (patch)
treedb12b860677dd59f3e3ffddb71c670de7aeb36d3 /source/blender/windowmanager/intern/wm_files.c
parent867c49b962fed324b41492e4cbaf586b5020e2dd (diff)
WM: Fix crash when a new window can't be created
Report an error instead of crashing if a new window can't be created (typically caused by bad drivers).
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index d08c6c59a7f..fc5cad6d057 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -438,7 +438,14 @@ void wm_file_read_report(bContext *C)
static void wm_file_read_post(bContext *C, bool is_startup_file)
{
bool addons_loaded = false;
- CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first);
+ wmWindowManager *wm = CTX_wm_manager(C);
+
+ if (!G.background) {
+ /* remove windows which failed to be added via WM_check */
+ wm_window_ghostwindows_remove_invalid(C, wm);
+ }
+
+ CTX_wm_window_set(C, wm->windows.first);
ED_editors_init(C);
DAG_on_visible_update(CTX_data_main(C), true);