[Orxonox-commit 4983] r9652 - code/branches/core6/src/libraries/core/class

landauf at orxonox.net landauf at orxonox.net
Fri Aug 16 21:38:00 CEST 2013


Author: landauf
Date: 2013-08-16 21:38:00 +0200 (Fri, 16 Aug 2013)
New Revision: 9652

Modified:
   code/branches/core6/src/libraries/core/class/IdentifierManager.cc
Log:
fixed potential issue

Modified: code/branches/core6/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- code/branches/core6/src/libraries/core/class/IdentifierManager.cc	2013-08-16 19:20:59 UTC (rev 9651)
+++ code/branches/core6/src/libraries/core/class/IdentifierManager.cc	2013-08-16 19:38:00 UTC (rev 9652)
@@ -104,6 +104,10 @@
 
         std::set<Identifier*> initializedIdentifiers;
 
+        // ensure root context exists before starting to create objects. if the root context is dynamically created while creating the class hierarchy, we
+        // would mistakenly assume the class of the currently created object inherits from Context
+        Context::getRootContext();
+
         // iterate over all identifiers, create one instance of each class and initialize the identifiers
         {
             Context temporaryContext(NULL);




More information about the Orxonox-commit mailing list