]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Null pointer exception in SALOMEDS_StudyManager::copy() abn/oscar_fix
authorabn <adrien.bruneton@cea.fr>
Tue, 18 Apr 2017 12:57:06 +0000 (14:57 +0200)
committerabn <adrien.bruneton@cea.fr>
Tue, 18 Apr 2017 12:57:06 +0000 (14:57 +0200)
src/SALOMEDS/SALOMEDS_StudyManager.cxx

index ba0a8f20652fc975c66b5730b227923031f6f978..175c1ebaf93c47de83a8757b0044d4cd41ff1986 100644 (file)
@@ -241,6 +241,9 @@ bool SALOMEDS_StudyManager::CanCopy(const _PTR(SObject)& theSO)
 bool SALOMEDS_StudyManager::Copy(const _PTR(SObject)& theSO)
 {
   SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO.get());
+  if (!aSO)
+    return false;
+
   bool ret;
   if (_isLocal) {
     SALOMEDS::Locker lock;