Fix #111073: Crash when F3 is pressed

Initializing a string whit `nullptr` causes undefined behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/111075
This commit is contained in:
Guillermo
2023-08-12 22:21:50 +02:00
committed by Hans Goudey
parent c97178fa2e
commit 0f501865a5

View File

@@ -168,7 +168,7 @@ static bool menu_items_from_ui_create_item_from_button(MenuSearch_Data *data,
MenuSearch_Item *item = nullptr;
/* Use override if the name is empty, this can happen with popovers. */
std::string drawstr_override = nullptr;
std::string drawstr_override;
const char *drawstr_sep = (but->flag & UI_BUT_HAS_SEP_CHAR) ?
strrchr(but->drawstr, UI_SEP_CHAR) :
nullptr;