diff --git a/source/blender/windowmanager/intern/wm_operator_type.cc b/source/blender/windowmanager/intern/wm_operator_type.cc index b6e9356dc58..7eb647d0a92 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.cc +++ b/source/blender/windowmanager/intern/wm_operator_type.cc @@ -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;