summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index edbeebb3c0b3..b9c1c27827bb 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -201,7 +201,8 @@ private:
template <typename T> void registerInterface(T* pInterface, DWORD& cookie)
{
- assert(cookie == 0); // do not set again
+ if (cookie != 0) // E.g., on subsequent RunObject calls
+ return;
HRESULT hr = m_pGlobalTable->RegisterInterfaceInGlobal(pInterface, __uuidof(T), &cookie);
SAL_WARN_IF(FAILED(hr), "embeddedobj.ole", "RegisterInterfaceInGlobal failed");
}