fix: corrupted title of alert dialog (#32467)

Co-authored-by: Takao Baba <babatakao@gmail.com>
This commit is contained in:
trop[bot]
2022-01-17 16:35:05 +09:00
committed by GitHub
parent 9629d8fc58
commit ef1243803f

View File

@@ -107,8 +107,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 = title.c_str();