mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 10:09:29 +02:00
WS, Win32: ShowModal, Fix checking for correct handle. Prevent crash. See Issue #39314
(cherry picked from commit 668fd03717
)
This commit is contained in:
parent
02f62c3836
commit
5cd595f179
@ -995,7 +995,7 @@ var
|
||||
lOldWorkingDir, lInitialDir: string;
|
||||
Dialog: IFileOpenDialog;
|
||||
begin
|
||||
if ACommonDialog.Handle <> INVALID_HANDLE_VALUE then
|
||||
if ACommonDialog.HandleAllocated and (ACommonDialog.Handle <> INVALID_HANDLE_VALUE) then
|
||||
begin
|
||||
State := SaveApplicationState;
|
||||
lOldWorkingDir := GetCurrentDirUTF8;
|
||||
|
Loading…
Reference in New Issue
Block a user