IRC bug report
Text editor, "Add new" caused zero-user block. The claim in the code why it should be decreased is dubious. Thanks wiseman!
This commit is contained in:
@@ -162,7 +162,9 @@ static int new_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
if(prop) {
|
||||
/* when creating new ID blocks, use is already 1, but RNA
|
||||
* pointer se also increases user, so this compensates it */
|
||||
text->id.us--;
|
||||
/* doesnt always seem to happen... (ton) */
|
||||
if(text->id.us>1)
|
||||
text->id.us--;
|
||||
|
||||
RNA_id_pointer_create(&text->id, &idptr);
|
||||
RNA_property_pointer_set(&ptr, prop, idptr);
|
||||
|
||||
Reference in New Issue
Block a user