From daa05f19cb49aefb80c3ce974f29f45cd4148fbc Mon Sep 17 00:00:00 2001 From: Yuriy Sydorov Date: Sat, 11 Sep 2021 19:53:50 +0300 Subject: [PATCH] * Prevent a crash of the tw2423 test on some versions of Windows. --- tests/webtbs/tw2423.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/webtbs/tw2423.pp b/tests/webtbs/tw2423.pp index dba658d94d..934fbe2ed0 100644 --- a/tests/webtbs/tw2423.pp +++ b/tests/webtbs/tw2423.pp @@ -6,6 +6,7 @@ {$mode objfpc} {$endif} { $define BugAvoid} +uses windows; type pVariant=^Variant; function ShowHTMLDialog(const hwndParent:longint;const pmk:pointer; @@ -103,5 +104,8 @@ begin {$endif} + // Create a dummy main window to prevent a crash in ShowHTMLDialog() on some versions of Windows + CreateWindow('STATIC', 'Test', WS_POPUP, 0, 0, 200, 200, 0, 0, HInstance, nil); + ShowHTMLDialog(0,pmk,InParam,nil,nil); end.