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>2016-06-21 20:29:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-21 21:17:02 +0300
commite783fddc0167eeb58bd69ed08ff31d0746772ad6 (patch)
treecc935f54bfb484d47dd0ec6ad79f7d8a1ef8b6f7 /source/blender/windowmanager/intern
parent028ba319038c6d6fb391df38874af68dae6c4eb5 (diff)
Fix T48700: Crash when window creation fails
Check if Python is initialized before calling BPY_python_end.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 6300d2ed3c7..917e2bf5913 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -533,7 +533,7 @@ void WM_exit_ext(bContext *C, const bool do_python)
#ifdef WITH_PYTHON
/* option not to close python so we can use 'atexit' */
- if (do_python) {
+ if (do_python && ((C == NULL) || CTX_py_init_get(C))) {
/* XXX - old note */
/* before BKE_blender_free so py's gc happens while library still exists */
/* needed at least for a rare sigsegv that can happen in pydrivers */