stoc: must check *both* bDisposed and bInDispose

Implementation::inspect() was crashing with a null reflection_ in
CppunitTest_libreofficekit_tiledrendering because another thread
was disposing it.

Actually, why are there 2 bools for this and not one enum with 3 values?

Change-Id: Icd27145d3203e1f48a9841ee6251a50cb73f7988
This commit is contained in:
Michael Stahl
2015-03-13 18:43:21 +01:00
parent fac344f147
commit d19249c66d

View File

@@ -1575,7 +1575,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
throw (css::uno::RuntimeException, std::exception)
{
osl::MutexGuard g(m_aMutex);
if (rBHelper.bDisposed) {
if (rBHelper.bDisposed || rBHelper.bInDispose) {
throw css::lang::DisposedException(
getImplementationName(), static_cast<OWeakObject *>(this));
}