Fix passing allocated strings to guarded-alloc
This commit is contained in:
@@ -2977,7 +2977,7 @@ static wmOperator *minimal_operator_create(wmOperatorType *ot, PointerRNA *prope
|
||||
{
|
||||
/* Copied from #wm_operator_create.
|
||||
* Create a slimmed down operator suitable only for UI drawing. */
|
||||
wmOperator *op = MEM_cnew<wmOperator>(ot->idname);
|
||||
wmOperator *op = MEM_cnew<wmOperator>(ot->rna_ext.srna ? __func__ : ot->idname);
|
||||
STRNCPY(op->idname, ot->idname);
|
||||
op->type = ot;
|
||||
|
||||
|
||||
@@ -1394,8 +1394,9 @@ static wmOperator *wm_operator_create(wmWindowManager *wm,
|
||||
PointerRNA *properties,
|
||||
ReportList *reports)
|
||||
{
|
||||
/* Operator-type names are static still. pass to allocation name for debugging. */
|
||||
wmOperator *op = MEM_cnew<wmOperator>(ot->idname);
|
||||
/* Operator-type names are static still (for C++ defined operators).
|
||||
* Pass to allocation name for debugging. */
|
||||
wmOperator *op = MEM_cnew<wmOperator>(ot->rna_ext.srna ? __func__ : ot->idname);
|
||||
|
||||
/* Adding new operator could be function, only happens here now. */
|
||||
op->type = ot;
|
||||
|
||||
Reference in New Issue
Block a user