Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-07-20 22:50:09 +0300
committerJulian Eisel <julian@blender.org>2021-07-20 22:50:09 +0300
commitd3445496b17997d9b58104bed452e2e46b8d165e (patch)
tree044f4cb5743e0ba714980e25084ce0c844d0fc92
parentcb0b017d8f5178b58a59c66e9588199f2864608b (diff)
Fix memory leak with asset view template operator properties
-rw-r--r--source/blender/editors/interface/interface_template_list.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc
index 4a500962478..0ab45ea0f81 100644
--- a/source/blender/editors/interface/interface_template_list.cc
+++ b/source/blender/editors/interface/interface_template_list.cc
@@ -1271,7 +1271,9 @@ PointerRNA *UI_list_custom_activate_operator_set(uiList *ui_list,
}
if (create_properties) {
- WM_operator_properties_alloc(&dyn_data->custom_activate_opptr, nullptr, opname);
+ PointerRNA *opptr = dyn_data->custom_activate_opptr;
+ WM_operator_properties_alloc(
+ &dyn_data->custom_activate_opptr, opptr ? (IDProperty **)&opptr->data : nullptr, opname);
}
return dyn_data->custom_activate_opptr;
@@ -1291,7 +1293,9 @@ PointerRNA *UI_list_custom_drag_operator_set(uiList *ui_list,
}
if (create_properties) {
- WM_operator_properties_alloc(&dyn_data->custom_drag_opptr, nullptr, opname);
+ PointerRNA *opptr = dyn_data->custom_drag_opptr;
+ WM_operator_properties_alloc(
+ &dyn_data->custom_drag_opptr, opptr ? (IDProperty **)&opptr->data : nullptr, opname);
}
return dyn_data->custom_drag_opptr;