summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-03-13 09:36:46 +0200
committerMichael Meeks <michael.meeks@collabora.com>2021-04-10 15:53:36 +0100
commit8f1d63dddddaa9e5dd16b77fce4193fa971c93fd (patch)
tree1042a4be0ca62c215459b73428f168270429b627 /basic
parent636aeaea41de1f494e0741b3d4e72bb5464edf26 (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')
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--basic/source/runtime/methods1.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 5e9647e955a7..a9caaccc9758 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 c847df8d26e6..2f9b6ff7b655 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();
}