Revision: 37364
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37364
Author: aligorith
Date: 2011-06-10 12:08:55 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Bugfix: Text Editor operators crash when invoked from Python/Console
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/editors/space_text/text_draw.c
Modified: branches/soc-2011-pepper/source/blender/editors/space_text/text_draw.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/space_text/text_draw.c
2011-06-10 10:13:50 UTC (rev 37363)
+++ branches/soc-2011-pepper/source/blender/editors/space_text/text_draw.c
2011-06-10 12:08:55 UTC (rev 37364)
@@ -907,9 +907,12 @@
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) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs