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:
2010-12-03 18:39:40 +00:00
parent 5ae3c5d321
commit b036437a5b

View File

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