Fix #28747: Crash in Node Editor
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 26 Sep 2011 08:51:02 +0000 (08:51 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 26 Sep 2011 08:51:02 +0000 (08:51 +0000)
Setting of transform flags happened with NULL edittree

source/blender/editors/transform/transform_conversions.c

index b7a5f4bd9792a5a4ab3e5b766480bdfe8fe54e98..54ab93b5fcf0de0e2df98021ef55085f861bb929 100644 (file)
@@ -5227,6 +5227,11 @@ static void createTransNodeData(bContext *C, TransInfo *t)
        SpaceNode *snode= t->sa->spacedata.first;
        bNode *node;
 
+       if(!snode->edittree) {
+               t->total= 0;
+               return;
+       }
+
        /* set transform flags on nodes */
        for (node=snode->edittree->nodes.first; node; node=node->next) {
                if ((node->flag & NODE_SELECT) || (node->parent && (node->parent->flag & NODE_TRANSFORM)))