Skip to content

Commit

Permalink
Fix issue with closing settings dialog from taskbar
Browse files Browse the repository at this point in the history
  • Loading branch information
vanjac committed Jul 26, 2022
1 parent f2b4cd6 commit 46f86eb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/SettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,14 @@ void openSettingsDialog() {
}

bool handleSettingsDialogMessage(MSG *msg) {
if (settingsDialog && PropSheet_IsDialogMessage(settingsDialog, msg)) {
if (!PropSheet_GetCurrentPageHwnd(settingsDialog)) {
DestroyWindow(settingsDialog);
settingsDialog = nullptr;
}
return true;
if (!settingsDialog)
return false;
bool isDialogMessage = !!PropSheet_IsDialogMessage(settingsDialog, msg);
if (!PropSheet_GetCurrentPageHwnd(settingsDialog)) {
DestroyWindow(settingsDialog);
settingsDialog = nullptr;
}
return false;
return isDialogMessage;
}

} // namespace

0 comments on commit 46f86eb

Please sign in to comment.