Don't crash in wxActiveXContainer if FindConnectionPoint() failed.
This method is supposed to succeed but don't crash by calling Advise() on NULL pointer if it did not. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
384a14ff32
commit
e5a1bd6409
@ -1022,11 +1022,14 @@ void wxActiveXContainer::CreateActiveX(REFIID iid, IUnknown* pUnk)
|
||||
cpContainer->FindConnectionPoint(ta->guid, cp.GetRef());
|
||||
CHECK_HR(hret);
|
||||
|
||||
IDispatch* disp;
|
||||
m_frameSite->QueryInterface(IID_IDispatch, (void**)&disp);
|
||||
hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
|
||||
&adviseCookie);
|
||||
CHECK_HR(hret);
|
||||
if ( cp )
|
||||
{
|
||||
IDispatch* disp;
|
||||
m_frameSite->QueryInterface(IID_IDispatch, (void**)&disp);
|
||||
hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
|
||||
&adviseCookie);
|
||||
CHECK_HR(hret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user