]> git.saurik.com Git - wxWidgets.git/commitdiff
guard against NULL win (happens during debug startup of RTTI, Clone test)
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 9 Jan 2009 14:02:30 +0000 (14:02 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 9 Jan 2009 14:02:30 +0000 (14:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmlctrl/webkit/webkit.mm

index 7e28d801ed57625ddf7c017c74d5d98c48a8d50d..8926f450e4832763e127bcb13882a11940b9ee67 100644 (file)
@@ -293,8 +293,11 @@ DEFINE_EVENT_TYPE( wxEVT_WEBKIT_STATE_CHANGED )
 wxWebKitStateChangedEvent::wxWebKitStateChangedEvent( wxWindow* win )
 {
     SetEventType( wxEVT_WEBKIT_STATE_CHANGED);
 wxWebKitStateChangedEvent::wxWebKitStateChangedEvent( wxWindow* win )
 {
     SetEventType( wxEVT_WEBKIT_STATE_CHANGED);
-    SetEventObject( win );
-    SetId(win->GetId());
+    if ( win )
+    {
+        SetEventObject( win );
+        SetId(win->GetId());
+    }
 }
 
 IMPLEMENT_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent, wxCommandEvent )
 }
 
 IMPLEMENT_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent, wxCommandEvent )
@@ -305,8 +308,11 @@ wxWebKitBeforeLoadEvent::wxWebKitBeforeLoadEvent( wxWindow* win )
 {
     m_cancelled = false;
     SetEventType( wxEVT_WEBKIT_BEFORE_LOAD);
 {
     m_cancelled = false;
     SetEventType( wxEVT_WEBKIT_BEFORE_LOAD);
-    SetEventObject( win );
-    SetId(win->GetId());
+    if ( win )
+    {
+        SetEventObject( win );
+        SetId(win->GetId());
+    }
 }
 
 
 }
 
 
@@ -317,8 +323,11 @@ DEFINE_EVENT_TYPE( wxEVT_WEBKIT_NEW_WINDOW )
 wxWebKitNewWindowEvent::wxWebKitNewWindowEvent( wxWindow* win )
 {
     SetEventType( wxEVT_WEBKIT_NEW_WINDOW);
 wxWebKitNewWindowEvent::wxWebKitNewWindowEvent( wxWindow* win )
 {
     SetEventType( wxEVT_WEBKIT_NEW_WINDOW);
-    SetEventObject( win );
-    SetId(win->GetId());
+    if ( win )
+    {
+        SetEventObject( win );
+        SetId(win->GetId());
+    }
 }
 
 
 }