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 18:39:07 +0100
commit1952332148ff351c21a198945fa76154d7e1f209 (patch)
treead1495939aa106d569715eab75e47d8ea3c6d703 /vcl
parente83ef8c5d1f6999bc0479b7bbbecca64f5d8ab05 (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>
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 ) )
{