[Orxonox-commit 7074] r11691 - code/trunk/src/libraries/core

landauf at orxonox.net landauf at orxonox.net
Wed Jan 3 01:05:23 CET 2018


Author: landauf
Date: 2018-01-03 01:05:21 +0100 (Wed, 03 Jan 2018)
New Revision: 11691

Modified:
   code/trunk/src/libraries/core/Core.cc
Log:
bugfix: don't try to unload a DynLib if it doesn't exist (e.g. after loading the DynLib failed)

Modified: code/trunk/src/libraries/core/Core.cc
===================================================================
--- code/trunk/src/libraries/core/Core.cc	2017-12-18 11:40:00 UTC (rev 11690)
+++ code/trunk/src/libraries/core/Core.cc	2018-01-03 00:05:21 UTC (rev 11691)
@@ -326,8 +326,10 @@
         StaticInitializationManager::getInstance().unloadModule(module);
 
         module->deleteAllStaticallyInitializedInstances();
-        this->dynLibManager_->unload(module->getDynLib());
-        module->setDynLib(nullptr);
+        if (module->getDynLib()) {
+            this->dynLibManager_->unload(module->getDynLib());
+            module->setDynLib(nullptr);
+        }
     }
 
     void Core::loadGraphics()



More information about the Orxonox-commit mailing list