diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-04-21 07:58:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-04-21 08:56:23 +0200 |
commit | 2dce6754355a06e567427c39154d8747538864b1 (patch) | |
tree | 741074dc283cf4c6ff939f45f55020556604693e /desktop/source | |
parent | f4716b19e42ae89ab0c1d5df7e2e51cc7bb6a30e (diff) |
Reliably stop ExtensionCmdQueue::Thread::execute
...even if nSize == 0
Change-Id: I624a5958d0826aad70277af6291f62d31ced6798
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133236
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 863e6811c32d..77630a365582 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -699,6 +699,9 @@ void ExtensionCmdQueue::Thread::execute() m_bWorking = false; } + if ( eInput == STOP ) + break; + // If this thread has been woken up by anything else except start, stop // then input is NONE and we wait again. // We only install the extension which are currently in the queue. @@ -707,8 +710,6 @@ void ExtensionCmdQueue::Thread::execute() // have reached the end while we still install newly added extensions. if ( ( eInput == NONE ) || ( nSize == 0 ) ) continue; - if ( eInput == STOP ) - break; ::rtl::Reference< ProgressCmdEnv > currentCmdEnv( new ProgressCmdEnv( m_xContext, m_pDialogHelper, m_sDefaultCmd ) ); |