fix: Corrupted title of alert dialog (#32470)

Co-authored-by: Takao Baba <babatakao@gmail.com>
This commit is contained in:
trop[bot]
2022-01-17 16:31:47 +09:00
committed by GitHub
parent ada1e9137b
commit de8623db8a

View File

@@ -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);