Skip to content

Commit

Permalink
Call DestroyWindow rather than EndDialog, and update bDialogMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjustice committed Apr 23, 2018
1 parent 737a608 commit f2dd108
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wfdlgs3.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,14 +800,14 @@ FormatSelectDlgProc(register HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam)
}
else
{
EndDialog(hDlg, IDOK);
DestroyWindow(hDlg);
hwndFormatSelect = NULL;
}

return TRUE;
}
case IDCANCEL:
EndDialog(hDlg, IDCANCEL);
DestroyWindow(hDlg);
hwndFormatSelect = NULL;
return TRUE;
}
Expand Down
3 changes: 3 additions & 0 deletions src/winfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,9 @@ bDialogMessage(PMSG pMsg)
!CancelInfo.bModal &&
IsDialogMessage(CancelInfo.hCancelDlg, pMsg)) ||

(hwndFormatSelect &&
IsDialogMessage(hwndFormatSelect, pMsg)) ||

(SearchInfo.hSearchDlg &&
IsDialogMessage(SearchInfo.hSearchDlg, pMsg)))

Expand Down

0 comments on commit f2dd108

Please sign in to comment.