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:
Stefan Csomor
2009-01-09 14:02:30 +00:00
parent 50dd85fa01
commit d2fa18d3a1

View File

@@ -293,9 +293,12 @@ DEFINE_EVENT_TYPE( wxEVT_WEBKIT_STATE_CHANGED )
wxWebKitStateChangedEvent::wxWebKitStateChangedEvent( wxWindow* win )
{
SetEventType( wxEVT_WEBKIT_STATE_CHANGED);
if ( win )
{
SetEventObject( win );
SetId(win->GetId());
}
}
IMPLEMENT_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent, wxCommandEvent )
@@ -305,9 +308,12 @@ wxWebKitBeforeLoadEvent::wxWebKitBeforeLoadEvent( wxWindow* win )
{
m_cancelled = false;
SetEventType( wxEVT_WEBKIT_BEFORE_LOAD);
if ( win )
{
SetEventObject( win );
SetId(win->GetId());
}
}
IMPLEMENT_DYNAMIC_CLASS( wxWebKitNewWindowEvent, wxCommandEvent )
@@ -317,9 +323,12 @@ DEFINE_EVENT_TYPE( wxEVT_WEBKIT_NEW_WINDOW )
wxWebKitNewWindowEvent::wxWebKitNewWindowEvent( wxWindow* win )
{
SetEventType( wxEVT_WEBKIT_NEW_WINDOW);
if ( win )
{
SetEventObject( win );
SetId(win->GetId());
}
}