Fix MEM_new/MEM_freeN mistach

Calling `MEM_freeN` on data allocated with `MEM_new` is bad, since it will not
call a destructor matching the one invoked as part of `MEM_new`.

Would crash with the guarded allocator, which detects such mismatches now.
This commit is contained in:
Julian Eisel 2024-07-07 19:08:13 +02:00
parent d58f1f614e
commit 7ef0c37bef

@ -5627,7 +5627,7 @@ void UI_but_operator_set(uiBut *but,
MEM_SAFE_FREE(but->opptr); MEM_SAFE_FREE(but->opptr);
if (op_props) { if (op_props) {
but->opptr = MEM_new<PointerRNA>(__func__, *op_props); but->opptr = MEM_cnew<PointerRNA>(__func__, *op_props);
} }
} }