Browse Source

Do not try to un-register an invalid module reference.

Sascha Zelzer 12 years ago
parent
commit
31f099b081
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

+ 2 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

@@ -245,6 +245,8 @@ ctkCmdLineModuleManager::registerModule(const QUrl &location)
 //----------------------------------------------------------------------------
 void ctkCmdLineModuleManager::unregisterModule(const ctkCmdLineModuleReference& ref)
 {
+  if (!ref) return;
+
   {
     QMutexLocker lock(&d->Mutex);
     if (!d->LocationToRef.contains(ref.location()))