[ui] fix an issue where 2 dialogs could exist onscreen when switching languages

This commit is contained in:
Pete Batard 2018-06-06 23:15:41 +01:00
parent fca4e2d59b
commit 60e21ed910
2 changed files with 8 additions and 5 deletions

View file

@ -4052,6 +4052,9 @@ relaunch:
/*
* Create the main Window
*/
if (hDlg != NULL)
// Make sure any previous dialog is destroyed (e.g. when switching languages)
DestroyWindow(hDlg);
hDlg = MyCreateDialog(hInstance, IDD_DIALOG, NULL, MainCallback);
if (hDlg == NULL) {
MessageBoxExU(NULL, "Could not create Window", "DialogBox failure",