Fix #31272: Blender Crashes when press render
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 3 May 2012 12:55:18 +0000 (12:55 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 3 May 2012 12:55:18 +0000 (12:55 +0000)
Issue was caused by missed libraries. Seems compositor nodes already does check
in such cases, added the same check to texture and shader nodes.

source/blender/nodes/shader/nodes/node_shader_common.c
source/blender/nodes/texture/nodes/node_texture_common.c

index f75cecfe83b29ed76f717950269b85e77aeeab98..bd31f20b18c168ec71e57505944c58c788dd1eee 100644 (file)
@@ -73,6 +73,9 @@ static void *group_initexec(bNode *node)
        bNodeTree *ngroup= (bNodeTree*)node->id;
        bNodeTreeExec *exec;
        
+       if (!ngroup)
+               return NULL;
+       
        /* initialize the internal node tree execution */
        exec = ntreeShaderBeginExecTree(ngroup, 0);
        
index 9a66ecb5ffb5b507f515a2a1c22e46dd7311dcef..2a9107f949820911fd2a5d025106c57c7684d6e6 100644 (file)
@@ -58,6 +58,9 @@ static void *group_initexec(bNode *node)
        bNodeTree *ngroup= (bNodeTree*)node->id;
        void *exec;
        
+       if (!ngroup)
+               return NULL;
+       
        /* initialize the internal node tree execution */
        exec = ntreeTexBeginExecTree(ngroup, 0);