This assert was wrong
In commit e2bfc34d14
(Reimplement
OleComponentNative_Impl to use IGlobalInterfaceTable, 2024-03-11),
I added the assert in a false assumption that RunObject may only
be called once. Indeed, this is not so. Thus just make sure to not
try to register it second time.
Change-Id: I36fc4f3939bd0061e462659749bba8e4bd3075ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165299
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
c15b872784
commit
328416e015
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue