diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2014-02-24 06:18:15 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-02-24 06:18:15 +0000 |
commit | da868a5dda60620ff29e23b977b75f20f6f1f24b (patch) | |
tree | 2b4077f795b48e8ec61df7cfee893a7123b949fb /src/corelib/x11 | |
parent | b0c9f165ee385f085c2f1086510daf8002f6fc51 (diff) | |
download | fpGUI-da868a5dda60620ff29e23b977b75f20f6f1f24b.tar.xz |
fix github bug #8: fpGUI as x11 root window fails.
Solution gave by Mohaslan. Checking if AWindow or AProperty actually
have valid values resolves the problem.
Diffstat (limited to 'src/corelib/x11')
-rw-r--r-- | src/corelib/x11/fpg_netlayer_x11.pas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/x11/fpg_netlayer_x11.pas b/src/corelib/x11/fpg_netlayer_x11.pas index b328378d..463eee8e 100644 --- a/src/corelib/x11/fpg_netlayer_x11.pas +++ b/src/corelib/x11/fpg_netlayer_x11.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -690,6 +690,8 @@ var bytes_after: culong; begin Result := False; + if (AWindow = 0) or (AProperty = 0) then + Exit; XGetWindowProperty (FDisplay, AWindow, AProperty, 0, MaxInt, TBool(False), XA_ATOM, @atomtype, @format, @nitems, @bytes_after, @Atoms); |