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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-24 13:43:21 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-24 13:43:21 +0300
commit7f7e51161f65c371d0f0c6c39bd32cbea45694cd (patch)
treedcbea3537c2af964444535871b5e6712b1874108 /source/blender/windowmanager/intern/wm_init_exit.c
parent293c15ec0cc3878bced1b52e274c078810ba2d8a (diff)
Fix T56079: crash with startup.blend saved in sculpt/paint modes.
This reverts commit 81a93df6d22c2f148667b9a6e8308e083a4cec39, it is not safe to handle initialization for startup.blend differently. Instead fix the root issue of the preview icon data structures not being initialized in time.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index c51d4c5534a..4b0d751a7ce 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -115,6 +115,7 @@
#include "ED_undo.h"
#include "UI_interface.h"
+#include "UI_resources.h"
#include "BLF_api.h"
#include "BLT_lang.h"
@@ -237,6 +238,11 @@ void WM_init(bContext *C, int argc, const char **argv)
BLF_init();
BLT_lang_init();
+ /* Init icons before reading .blend files for preview icons, which can
+ * get triggered by the depsgraph. This is also done in background mode
+ * for scripts that do background processing with preview icons. */
+ BKE_icons_init(BIFICONID_LAST);
+
/* reports cant be initialized before the wm,
* but keep before file reading, since that may report errors */
wm_init_reports(C);
@@ -259,13 +265,6 @@ void WM_init(bContext *C, int argc, const char **argv)
UI_init();
BKE_studiolight_init();
}
- else {
- /* Note: Currently only inits icons, which we now want in background mode too
- * (scripts could use those in background processing...).
- * In case we do more later, we may need to pass a 'background' flag.
- * Called from 'UI_init' above */
- BKE_icons_init(1);
- }
ED_spacemacros_init();