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:
authorJoshua Leung <aligorith@gmail.com>2011-06-10 16:08:55 +0400
committerJoshua Leung <aligorith@gmail.com>2011-06-10 16:08:55 +0400
commitff5fb2f4ef8997cb110476f2823b6edfd28cea08 (patch)
treee2980e6565d1d7107b89e21daa852a58744f7134 /source/blender/editors/space_text
parentee713387242e992fdb8d87897193a6946fd1d0c0 (diff)
Bugfix: Text Editor operators crash when invoked from Python/Console
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_draw.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 625e5561389..28230b7a48b 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -907,9 +907,12 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar)
void text_drawcache_tag_update(SpaceText *st, int full)
{
- DrawCache *drawcache= (DrawCache *)st->drawcache;
-
- if(drawcache) {
+ /* this happens if text editor ops are caled from python */
+ if (st == NULL)
+ return;
+
+ if(st->drawcache) {
+ DrawCache *drawcache= (DrawCache *)st->drawcache;
Text *txt= st->text;
if(drawcache->update_flag) {