Explorar el Código

Added missing null pointer check.

Sascha Zelzer hace 14 años
padre
commit
dd0963c234
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Libs/PluginFramework/ctkServiceRegistration.cpp

+ 1 - 1
Libs/PluginFramework/ctkServiceRegistration.cpp

@@ -44,7 +44,7 @@ ctkServiceRegistration::ctkServiceRegistration()
 ctkServiceRegistration::ctkServiceRegistration(const ctkServiceRegistration& reg)
   : d_ptr(reg.d_ptr)
 {
-  d_func()->ref.ref();
+  if (d_func()) d_func()->ref.ref();
 }
 
 //----------------------------------------------------------------------------