summaryrefslogtreecommitdiff
path: root/salhelper
diff options
context:
space:
mode:
Diffstat (limited to 'salhelper')
-rw-r--r--salhelper/source/thread.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/salhelper/source/thread.cxx b/salhelper/source/thread.cxx
index 3d9c4b372005..190daf5081b6 100644
--- a/salhelper/source/thread.cxx
+++ b/salhelper/source/thread.cxx
@@ -22,8 +22,13 @@ void salhelper::Thread::launch() {
// Assumption is that osl::Thread::create returns normally with a true
// return value iff it causes osl::Thread::run to start executing:
acquire();
- if (!create()) {
- throw std::runtime_error("osl::Thread::create failed");
+ try {
+ if (!create()) {
+ throw std::runtime_error("osl::Thread::create failed");
+ }
+ } catch (...) {
+ release();
+ throw;
}
}