소스 검색

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)
 void ctkCmdLineModuleManager::unregisterModule(const ctkCmdLineModuleReference& ref)
 {
 {
+  if (!ref) return;
+
   {
   {
     QMutexLocker lock(&d->Mutex);
     QMutexLocker lock(&d->Mutex);
     if (!d->LocationToRef.contains(ref.location()))
     if (!d->LocationToRef.contains(ref.location()))