From 25ea27c4035032015d912302229092624df745a2 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 11 Nov 2010 12:10:00 +0200 Subject: X11: extra checks and precautions --- src/corelib/x11/fpg_x11.pas | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index 667d4f63..5a4b6ccf 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -2127,6 +2127,9 @@ begin xapplication.DefaultVisual, mask, @attr); + if wh = 0 then + raise Exception.Create('fpGUI/X11: Failed to create window ' + ClassName); + FWinHandle := wh; FBackupWinHandle := wh; @@ -2154,6 +2157,7 @@ begin end; end; + FillChar(hints, sizeof(hints), 0); hints.flags := 0; if not (waAutoPos in FWindowAttributes) then -- cgit v1.2.3-70-g09d2