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:
parent
146a1c77ea
commit
a7918ea40e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue