Qt: Fixed AppWaitMessage(), produced AV's sometimes because of pending events.

git-svn-id: trunk@12533 -
This commit is contained in:
zeljko 2007-10-20 12:12:46 +00:00
parent ce4864f3b7
commit 53066a6564

View File

@ -138,7 +138,11 @@ end;
------------------------------------------------------------------------------}
procedure TQtWidgetSet.AppWaitMessage;
begin
QCoreApplication_processEvents(QEventLoopWaitForMoreEvents);
{we cannot call directly processEvents() with this flag
since it produces AV's sometimes, so better check is there
any pending event.}
if not QCoreApplication_hasPendingEvents then
QCoreApplication_processEvents(QEventLoopWaitForMoreEvents);
end;
{------------------------------------------------------------------------------