瀏覽代碼

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

Sascha Zelzer 12 年之前
父節點
當前提交
31f099b081
共有 1 個文件被更改,包括 2 次插入0 次删除
  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()))