Browse Source

Fix "Gui Object Namespace Issue" outlined in
http://www.garagegames.com/community/forums/viewthread/136187

Paul Jan 12 years ago
parent
commit
9ae5e32d84
1 changed files with 7 additions and 5 deletions
  1. 7 5
      engine/source/sim/simObject.cc

+ 7 - 5
engine/source/sim/simObject.cc

@@ -1314,14 +1314,16 @@ void SimObject::unlinkNamespaces()
 
 void SimObject::setClassNamespace( const char *classNamespace )
 {
-   mClassName = StringTable->insert( classNamespace );
-   linkNamespaces();
+    mClassName = StringTable->insert( classNamespace );
+    if (mFlags.test(Added))
+        linkNamespaces();
 }
 
 void SimObject::setSuperClassNamespace( const char *superClassNamespace )
-{  
-   mSuperClassName = StringTable->insert( superClassNamespace );
-   linkNamespaces();
+{
+    mSuperClassName = StringTable->insert( superClassNamespace );
+    if (mFlags.test(Added))
+        linkNamespaces();
 }
 
 static S32 QSORT_CALLBACK compareFields(const void* a,const void* b)