summaryrefslogtreecommitdiff
path: root/src/corelib/x11
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-04 09:52:56 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-04 09:52:56 +0200
commitb81c00f54ec7f453eb3189dea19eade3bb1b73a5 (patch)
tree370d9af81a8041e866d7e0f15fdef1b415c6d538 /src/corelib/x11
parent0aeb51dbc892cf76f3065c1df81f310103c97f8d (diff)
downloadfpGUI-b81c00f54ec7f453eb3189dea19eade3bb1b73a5.tar.xz
X11: extra failsafe before posting FPGM_RESIZE event.
Diffstat (limited to 'src/corelib/x11')
-rw-r--r--src/corelib/x11/fpg_x11.pas13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index a5fb68e0..837b2d34 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -1906,11 +1906,14 @@ begin
{ X11 is too efficient, so new windows don't need a OnResize when mapped,
but because Windows GDI does so, we want the same events under X11.
Lets fake one. }
- msgp.rect.Left := w.Left;
- msgp.rect.Top := w.Top;
- msgp.rect.Width := w.Width;
- msgp.rect.Height := w.Height;
- fpgPostMessage(nil, w, FPGM_RESIZE, msgp);
+ if w <> nil then
+ begin
+ msgp.rect.Left := w.Left;
+ msgp.rect.Top := w.Top;
+ msgp.rect.Width := w.Width;
+ msgp.rect.Height := w.Height;
+ fpgPostMessage(nil, w, FPGM_RESIZE, msgp);
+ end;
end;
X.UnmapNotify: