WS, Win32: ShowModal, Fix checking for correct handle. Prevent crash. See Issue #39314

(cherry picked from commit 754cedea82)
This commit is contained in:
Martin 2021-09-24 15:48:45 +02:00
parent 962f05f665
commit 02f62c3836

View File

@ -995,7 +995,7 @@ var
lOldWorkingDir, lInitialDir: string;
Dialog: IFileOpenDialog;
begin
if ACommonDialog.Handle <> 0 then
if ACommonDialog.Handle <> INVALID_HANDLE_VALUE then
begin
State := SaveApplicationState;
lOldWorkingDir := GetCurrentDirUTF8;