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>2011-10-03 01:21:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-03 01:21:14 +0400
commit4a0c3e2a12498c0769eabf9ee1dab30d01fe658d (patch)
tree2ac067bf6955a14e33a4f587b5bb6a5bd126eca2 /source/blender/windowmanager
parente49688f021dd7d19b46efb54f0cbe21aaf6f45ee (diff)
fix [#28784] CRASHER on load with load_post handler
also fix pacman package build spec.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 76ebeaa9f21..bf5b60d691f 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -412,6 +412,10 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
BPY_app_handlers_reset();
BPY_modules_load_user(C);
#endif
+
+ /* important to do before NULL'ing the context */
+ BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
+
CTX_wm_window_set(C, NULL); /* exits queues */
#if 0 /* gives popups on windows but not linux, bug in report API but disable for now to stop users getting annoyed */
@@ -429,8 +433,6 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
// XXX undo_editmode_clear();
BKE_reset_undo();
BKE_write_undo(C, "original"); /* save current state */
-
- BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
}
else if(retval == BKE_READ_EXOTIC_OK_OTHER)
BKE_write_undo(C, "Import file");