diff options
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 5995e69a73a..b3497b9932f 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -591,6 +591,8 @@ void BKE_text_unlink(Main *bmain, Text *text) /* nodes */ for (mat = bmain->mat.first; mat; mat = mat->id.next) { ntree = mat->nodetree; + if (!ntree) + continue; for (node = ntree->nodes.first; node; node = node->next) { if (node->type == SH_NODE_SCRIPT) { Text *ntext = (Text *)node->id; |