summaryrefslogtreecommitdiff
path: root/cppuhelper/source/component_context.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source/component_context.cxx')
-rw-r--r--cppuhelper/source/component_context.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index a07cd0e8f302..ac416f1745f9 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -672,6 +672,12 @@ Any ComponentContext::getValueByName( OUString const & rName )
Reference< lang::XMultiComponentFactory > ComponentContext::getServiceManager()
throw (RuntimeException)
{
+ if ( !m_xSMgr.is() )
+ {
+ throw RuntimeException(
+ "null component context service manager",
+ static_cast<OWeakObject *>(this) );
+ }
return m_xSMgr;
}
//__________________________________________________________________________________________________