summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-07-15 11:37:22 +0200
committerAron Budea <aron.budea@collabora.com>2018-01-26 19:58:22 +0100
commit7f7dd572d4fa4a46daff11c5a90655f689641758 (patch)
tree6ec17f2418d057e46fb7f62235cd6e1d1d7bd91a /vcl
parente3adde7b2dfa85c011640ea9689fa9258d0d61cc (diff)
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@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit f054b9187155bc32b7d06808aea87127cb0a3a4f) Reviewed-on: https://gerrit.libreoffice.org/48219 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 1952332148ff351c21a198945fa76154d7e1f209)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/app/salinst.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index da67ca44582f..293ce2c2cc0b 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -598,7 +598,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 ) )
{