From 26690b12f2a7478da276b993950344a9b3819d5f Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 16:34:26 +0900 Subject: [PATCH] fix: Corrupted title of alert dialog (#32468) Co-authored-by: Takao Baba --- shell/browser/ui/message_box_win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/browser/ui/message_box_win.cc b/shell/browser/ui/message_box_win.cc index 31484724d013d..724228e010189 100644 --- a/shell/browser/ui/message_box_win.cc +++ b/shell/browser/ui/message_box_win.cc @@ -171,8 +171,9 @@ DialogResult ShowTaskDialogWstr(NativeWindow* parent, // TaskDialogIndirect doesn't allow empty name, if we set empty title it // will show "electron.exe" in title. + std::wstring app_name; if (title.empty()) { - std::wstring app_name = base::UTF8ToWide(Browser::Get()->GetName()); + app_name = base::UTF8ToWide(Browser::Get()->GetName()); config.pszWindowTitle = app_name.c_str(); } else { config.pszWindowTitle = base::as_wcstr(title);