Fix #31369 (discussed in bug report comments). Setting the path/layer name strings of the file/layer slots of the file output node would crash, due to missing id.data pointer in the PointerRNA. Solved by using the iter->parent.id.data pointer for the RNA collection iterator.

This commit is contained in:
Lukas Toenne
2012-05-16 10:10:42 +00:00
parent e34a1fc1a5
commit b68673f37c

View File

@@ -833,7 +833,7 @@ static PointerRNA rna_NodeOutputFile_slot_file_get(CollectionPropertyIterator *i
{
PointerRNA ptr;
bNodeSocket *sock = rna_iterator_listbase_get(iter);
RNA_pointer_create(iter->ptr.id.data, &RNA_NodeOutputFileSlotFile, sock->storage, &ptr);
RNA_pointer_create(iter->parent.id.data, &RNA_NodeOutputFileSlotFile, sock->storage, &ptr);
return ptr;
}
@@ -841,7 +841,7 @@ static PointerRNA rna_NodeOutputFile_slot_layer_get(CollectionPropertyIterator *
{
PointerRNA ptr;
bNodeSocket *sock = rna_iterator_listbase_get(iter);
RNA_pointer_create(iter->ptr.id.data, &RNA_NodeOutputFileSlotLayer, sock->storage, &ptr);
RNA_pointer_create(iter->parent.id.data, &RNA_NodeOutputFileSlotLayer, sock->storage, &ptr);
return ptr;
}