[Libreoffice-commits] core.git: vcl/win
Mike Kaganski
mike.kaganski at collabora.com
Sat Jul 15 21:49:35 UTC 2017
vcl/win/app/salinst.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f054b9187155bc32b7d06808aea87127cb0a3a4f
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Sat Jul 15 11:37:22 2017 +0200
tdf#38915: don't wait on message queue if application already has quit.
Despite precautions in Application::Execute() and ImplYield(),
in my testing I sometimes see that soffice is waiting in
ImplSalYield()'s GetMessageW() when ImplGetSVData()->maAppData.mbAppQuit
is true, so that soffice.bin hangs in the background. I suspect
that this is related to the bug. Some obscure code path seems to
be able to get here after the flag is already set.
So, test also in ImplSalYield() right before GetMessageW() to
make sure. Another possibility is that we get here when the flag
is not set yet, and gets set while already waiting, but that would
mean this happens in a different thread.
Change-Id: Idb19eabcca8b5c24eac0ca76950edc1bf1e5bccb
Reviewed-on: https://gerrit.libreoffice.org/39996
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 1b1d0f82fee8..3a1522f7e836 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -580,7 +580,8 @@ ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
bOneEvent = false;
} while( --nMaxEvents && bOneEvent );
- if ( bWait && ! bWasMsg )
+ // Also check that we don't wait when application already has quit
+ if ( bWait && !bWasMsg && !ImplGetSVData()->maAppData.mbAppQuit )
{
if ( GetMessageW( &aMsg, nullptr, 0, 0 ) )
{
More information about the Libreoffice-commits
mailing list