guard against NULL win (happens during debug startup of RTTI, Clone test)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -293,9 +293,12 @@ DEFINE_EVENT_TYPE( wxEVT_WEBKIT_STATE_CHANGED )
|
|||||||
wxWebKitStateChangedEvent::wxWebKitStateChangedEvent( wxWindow* win )
|
wxWebKitStateChangedEvent::wxWebKitStateChangedEvent( wxWindow* win )
|
||||||
{
|
{
|
||||||
SetEventType( wxEVT_WEBKIT_STATE_CHANGED);
|
SetEventType( wxEVT_WEBKIT_STATE_CHANGED);
|
||||||
|
if ( win )
|
||||||
|
{
|
||||||
SetEventObject( win );
|
SetEventObject( win );
|
||||||
SetId(win->GetId());
|
SetId(win->GetId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent, wxCommandEvent )
|
IMPLEMENT_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent, wxCommandEvent )
|
||||||
|
|
||||||
@@ -305,9 +308,12 @@ wxWebKitBeforeLoadEvent::wxWebKitBeforeLoadEvent( wxWindow* win )
|
|||||||
{
|
{
|
||||||
m_cancelled = false;
|
m_cancelled = false;
|
||||||
SetEventType( wxEVT_WEBKIT_BEFORE_LOAD);
|
SetEventType( wxEVT_WEBKIT_BEFORE_LOAD);
|
||||||
|
if ( win )
|
||||||
|
{
|
||||||
SetEventObject( win );
|
SetEventObject( win );
|
||||||
SetId(win->GetId());
|
SetId(win->GetId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( wxWebKitNewWindowEvent, wxCommandEvent )
|
IMPLEMENT_DYNAMIC_CLASS( wxWebKitNewWindowEvent, wxCommandEvent )
|
||||||
@@ -317,9 +323,12 @@ DEFINE_EVENT_TYPE( wxEVT_WEBKIT_NEW_WINDOW )
|
|||||||
wxWebKitNewWindowEvent::wxWebKitNewWindowEvent( wxWindow* win )
|
wxWebKitNewWindowEvent::wxWebKitNewWindowEvent( wxWindow* win )
|
||||||
{
|
{
|
||||||
SetEventType( wxEVT_WEBKIT_NEW_WINDOW);
|
SetEventType( wxEVT_WEBKIT_NEW_WINDOW);
|
||||||
|
if ( win )
|
||||||
|
{
|
||||||
SetEventObject( win );
|
SetEventObject( win );
|
||||||
SetId(win->GetId());
|
SetId(win->GetId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user