summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-04 14:21:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-04 14:21:45 +0100
commite83f31724e0f2cd4242e0b398c48578da53cb5c1 (patch)
tree278b41e6a79dff38fef0a78107f405653773bec4 /cppuhelper
parent26cbb3d1049e789a1c2f56599dbfe0f379fc4b3d (diff)
tdf#82775: Don't prematurely dispose single-instance services
...that happen to be requested concurrently from multiple threads Change-Id: Icecfb0b8d88c9123064689643eddf90a99d3b1b8
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/component_context.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 1a95f4ae46ed..21f7cfde4b3b 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -620,7 +620,9 @@ Any ComponentContext::lookupMap( OUString const & rName )
ret = pEntry->value;
}
guard.clear();
- try_dispose( xInstance );
+ if (ret != xInstance) {
+ try_dispose( xInstance );
+ }
return ret;
}