Fix for r51837.

* mat->nodetree is accessed regardless of whether or not the material node is in use-

Patch provided by Tamito Kajiyama, thanks!
This commit is contained in:
Thomas Dinges
2012-11-04 01:32:39 +00:00
parent 61bc63799e
commit 2f2c0a51a5

View File

@@ -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;