Fix: Memory leak in gizmo tooltip function

This commit is contained in:
Hans Goudey
2024-01-31 15:41:55 -05:00
parent b0063a4690
commit 1934075d97
@@ -606,9 +606,9 @@ std::string WM_operatortype_description_or_name(bContext *C,
{
std::string text = WM_operatortype_description(C, ot, properties);
if (text.empty()) {
const std::string text_orig = WM_operatortype_name(ot, properties);
std::string text_orig = WM_operatortype_name(ot, properties);
if (!text_orig.empty()) {
text = BLI_strdupn(text_orig.c_str(), text_orig.size());
return text_orig;
}
}
return text;