Bugfix: Text Editor operators crash when invoked from Python/Console

This commit is contained in:
2011-06-10 12:08:55 +00:00
parent ee71338724
commit ff5fb2f4ef

View File

@@ -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) {