Fix for typeinfo NULL pointer crash when initializing unknown node types.

Noticed by @bdancer on IRC. Happens e.g. when loading a file with
pynodes which haven't been registered yet.
This commit is contained in:
Lukas Tönne 2014-05-12 15:33:20 +02:00
parent 146a1c77ea
commit a7918ea40e
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ static void node_set_typeinfo(const struct bContext *C, bNodeTree *ntree, bNode
{
/* for nodes saved in older versions storage can get lost, make undefined then */
if (node->flag & NODE_INIT) {
if (typeinfo->storagename[0] && !node->storage)
if (typeinfo && typeinfo->storagename[0] && !node->storage)
typeinfo = NULL;
}