[Orxonox-commit 6409] r11066 - code/branches/cpp11_v3/src/libraries/core/object

landauf at orxonox.net landauf at orxonox.net
Sun Jan 17 14:03:27 CET 2016


Author: landauf
Date: 2016-01-17 14:03:27 +0100 (Sun, 17 Jan 2016)
New Revision: 11066

Modified:
   code/branches/cpp11_v3/src/libraries/core/object/Destroyable.cc
Log:
fixed unittests (IdentifierManager doesn't always exist in tests)

Modified: code/branches/cpp11_v3/src/libraries/core/object/Destroyable.cc
===================================================================
--- code/branches/cpp11_v3/src/libraries/core/object/Destroyable.cc	2016-01-17 12:59:00 UTC (rev 11065)
+++ code/branches/cpp11_v3/src/libraries/core/object/Destroyable.cc	2016-01-17 13:03:27 UTC (rev 11066)
@@ -53,7 +53,7 @@
     */
     Destroyable::~Destroyable()
     {
-        if (!this->requestedDestruction_ && !IdentifierManager::getInstance().isCreatingHierarchy())
+        if (!this->requestedDestruction_ && IdentifierManager::exists() && !IdentifierManager::getInstance().isCreatingHierarchy())
             orxout(internal_warning) << "Deleted destroyable object without destroy()" << endl;
 
         assert(this->referenceCount_ <= 0);




More information about the Orxonox-commit mailing list