summaryrefslogtreecommitdiff
path: root/src/corelib/fpg_msgqueue.inc
diff options
context:
space:
mode:
authorAndrew Haines <andrewd207@aol.com>2010-11-05 17:28:50 -0400
committerAndrew Haines <andrewd207@aol.com>2010-11-05 17:28:50 -0400
commite320dfae6add39c66ea554dbb161a844ee06db4d (patch)
tree78451d8f643babcfb50376c1b6a53da6ef5ff616 /src/corelib/fpg_msgqueue.inc
parent917a2daf4ff769ad27631e6c71a7b919c47e4ecb (diff)
parent735aec8207036adb17f2174ffcb9056bee712ed3 (diff)
downloadfpGUI-e320dfae6add39c66ea554dbb161a844ee06db4d.tar.xz
Merge branch 'master' of ssh://fpgui.git.sourceforge.net/gitroot/fpgui/fpgui
Diffstat (limited to 'src/corelib/fpg_msgqueue.inc')
-rw-r--r--src/corelib/fpg_msgqueue.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/corelib/fpg_msgqueue.inc b/src/corelib/fpg_msgqueue.inc
index 386178d9..00862cc1 100644
--- a/src/corelib/fpg_msgqueue.inc
+++ b/src/corelib/fpg_msgqueue.inc
@@ -86,10 +86,15 @@ end;
function fpgGetFirstMessage: PfpgMessageRec;
begin
- if UsedFirstMessage <> nil then
- Result := @(UsedFirstMessage.msg)
- else
- Result := nil;
+ fpgApplication.Lock;
+ try
+ if UsedFirstMessage <> nil then
+ Result := @(UsedFirstMessage.msg)
+ else
+ Result := nil;
+ finally
+ fpgApplication.Unlock;
+ end;
end;
procedure fpgInitMsgQueue;