fix: Corrupted title of alert dialog (#32434)

This commit is contained in:
Takao Baba 2022-01-14 06:23:36 +09:00 committed by GitHub
parent 7f4efb6747
commit f75a274019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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