diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-03-13 09:36:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-14 08:20:53 +0100 |
commit | c880d3e30405342a5ae6239cc77f69ed3ca6cc15 (patch) | |
tree | 66114edb519a8908326f08c82f04375e022aa6d5 /basic/source | |
parent | ebe1f639cf65c20cee70aa55176bfb67e7b915f7 (diff) |
check for quit when calling Yield in loop
so we don't get stuck threads when the main application
quits
Change-Id: Id36e99267ceb4154873b6ef8ef494622fff6c19a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112409
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index cacaa7650357..a69a3f508ec7 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1048,7 +1048,7 @@ namespace if (m_bDelInst) { // Compare here with 1 instead of 0, because before nCallLvl-- - while (m_pSbData->pInst->nCallLvl != 1) + while (m_pSbData->pInst->nCallLvl != 1 && !Application::IsQuit()) Application::Yield(); } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 3fc1b0c2bf3a..2f89a90a8149 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -581,7 +581,7 @@ void Wait_Impl( bool bDurationBased, SbxArray& rPar ) Timer aTimer; aTimer.SetTimeout( nWait ); aTimer.Start(); - while ( aTimer.IsActive() ) + while ( aTimer.IsActive() && !Application::IsQuit()) { Application::Yield(); } |