diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/compbase.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/comphelper/compbase.hxx b/include/comphelper/compbase.hxx index 38380ede20d0..ad34ed7007ea 100644 --- a/include/comphelper/compbase.hxx +++ b/include/comphelper/compbase.hxx @@ -50,6 +50,11 @@ public: virtual void disposing(std::unique_lock<std::mutex>&); protected: + void throwIfDisposed(std::unique_lock<std::mutex>&) + { + if (m_bDisposed) + throw css::lang::DisposedException(OUString(), static_cast<cppu::OWeakObject*>(this)); + } comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> maEventListeners; mutable std::mutex m_aMutex; bool m_bDisposed = false; |