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:
parent
d58f1f614e
commit
7ef0c37bef
@ -5627,7 +5627,7 @@ void UI_but_operator_set(uiBut *but,
|
||||
|
||||
MEM_SAFE_FREE(but->opptr);
|
||||
if (op_props) {
|
||||
but->opptr = MEM_new<PointerRNA>(__func__, *op_props);
|
||||
but->opptr = MEM_cnew<PointerRNA>(__func__, *op_props);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user