Browse Source

fix crash on page reload

David Rose 16 years ago
parent
commit
52b1a2af67
1 changed files with 3 additions and 1 deletions
  1. 3 1
      direct/src/plugin_activex/PPInterface.cpp

+ 3 - 1
direct/src/plugin_activex/PPInterface.cpp

@@ -125,7 +125,9 @@ HRESULT PPInterface::GetHtmlDocDispatch( CComPtr<IDispatch>& pDispScript )
     HRESULT hr = S_OK; 
 
     CComPtr<IOleClientSite> pOleClientSite = GetClientSte( ); 
-    ASSERT( pOleClientSite ); 
+    if (pOleClientSite == NULL) {
+      return E_FAIL;
+    }
 
     CComPtr<IOleContainer> pOleContainer; 
     hr = pOleClientSite->GetContainer(& pOleContainer );