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
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);
+ }
}
}