summaryrefslogtreecommitdiff
path: root/src/corelib/x11
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-11-11 12:10:00 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-11-12 11:04:00 +0200
commit25ea27c4035032015d912302229092624df745a2 (patch)
tree3296e770de7909634fe01c6af6f6ed99e065564e /src/corelib/x11
parentd04fc7bb24b0df3a4df7ad35bdfa9d0669de915c (diff)
downloadfpGUI-25ea27c4035032015d912302229092624df745a2.tar.xz
X11: extra checks and precautions
Diffstat (limited to 'src/corelib/x11')
-rw-r--r--src/corelib/x11/fpg_x11.pas4
1 files changed, 4 insertions, 0 deletions
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