David Rose пре 16 година
родитељ
комит
ae7dcc4253

+ 5 - 0
direct/src/plugin_activex/PPBrowserObject.cpp

@@ -183,6 +183,11 @@ int PPBrowserObject::get_repr( char* buffer, int buffer_length ) const
     return (int)result.GetLength();
 }
 
+void PPBrowserObject::clear_class_definition() 
+{
+    _browser_object_class = NULL;
+}
+
 P3D_class_definition* PPBrowserObject::get_class_definition() 
 {
     if ( _browser_object_class == NULL ) 

+ 2 - 0
direct/src/plugin_activex/PPBrowserObject.h

@@ -34,6 +34,8 @@ public:
         P3D_object* params[], int num_params ) const;
     P3D_object* eval( const std::string &expression ) const;
 
+    static void clear_class_definition();
+
 protected:
     PPBrowserObject( );
     static P3D_class_definition* get_class_definition( );

+ 4 - 0
direct/src/plugin_activex/PPInstance.cpp

@@ -317,6 +317,10 @@ int PPInstance::UnloadPlugin()
         {  
             s_hP3DPluginDll = NULL;
         }
+
+        // This pointer is no longer valid and must be reset for next
+        // time.
+        PPBrowserObject::clear_class_definition();
     }
     return error;
 }