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>2008-04-04 20:32:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-04 20:32:13 +0400
commitb46ef6ecb39fac633c9f9890fae2f07013696500 (patch)
tree34d5e3bbd886d5bf6972a430694b8515e8e335d5 /source/blender/src/drawscript.c
parent5b06c03884f068892d349f456e43bc85f1ab037c (diff)
fix own bug with scripts drawing, could crash when a script failed
Diffstat (limited to 'source/blender/src/drawscript.c')
-rw-r--r--source/blender/src/drawscript.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/src/drawscript.c b/source/blender/src/drawscript.c
index b6ea63ca695..ab0a79220a7 100644
--- a/source/blender/src/drawscript.c
+++ b/source/blender/src/drawscript.c
@@ -108,14 +108,16 @@ void drawscriptspace(ScrArea *sa, void *spacedata)
}
}
- if (script->py_draw) {
- BPY_spacescript_do_pywin_draw(sc);
+ if (script) {
+ if (script->py_draw) {
+ BPY_spacescript_do_pywin_draw(sc);
+ } else if (!script->flags && !script->py_event && !script->py_button) {
+ /* quick hack for 2.37a for scripts that call the progress bar inside a
+ * file selector callback, to show previous space after finishing, w/o
+ * needing an event */
+ addqueue(curarea->win, MOUSEX, 0);
+ }
}
- /* quick hack for 2.37a for scripts that call the progress bar inside a
- * file selector callback, to show previous space after finishing, w/o
- * needing an event */
- else if (!script->flags && !script->py_event && !script->py_button)
- addqueue(curarea->win, MOUSEX, 0);
}
void winqreadscriptspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt)