Browse Source

fix: corrupted title of alert dialog (#32467)

Co-authored-by: Takao Baba <[email protected]>
trop[bot] 3 years ago
parent
commit
ef1243803f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      shell/browser/ui/message_box_win.cc

+ 2 - 1
shell/browser/ui/message_box_win.cc

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