Page MenuHome
Paste P1120

T70279 safeguard
ActivePublic

Authored by Philipp Oeser (lichtwerk) on Sep 27 2019, 1:22 PM.
diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c
index 2c4ba4a1102..cde5e82790d 100644
--- a/source/blender/blenloader/intern/versioning_cycles.c
+++ b/source/blender/blenloader/intern/versioning_cycles.c
@@ -766,7 +766,9 @@ static void update_vector_math_node_average_operator(bNodeTree *ntree)
static void update_noise_node_dimensions(bNodeTree *ntree)
{
for (bNode *node = ntree->nodes.first; node; node = node->next) {
- if (node->type == SH_NODE_TEX_NOISE) {
+ /* Can happen in certain scenarios (see update_mapping_node_inputs_and_properties)
+ * OR if the node itself is broken in the file ('Undefined') */
+ if (node->type == SH_NODE_TEX_NOISE && node->storage) {
NodeTexNoise *tex = (NodeTexNoise *)node->storage;
tex->dimensions = 3;
}