clear_class_definition

This commit is contained in:
David Rose 2009-09-16 20:21:32 +00:00
parent c06abc5887
commit ae7dcc4253
3 changed files with 11 additions and 0 deletions

View File

@ -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 )

View File

@ -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( );

View File

@ -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;
}