From: abn Date: Tue, 18 Apr 2017 12:57:06 +0000 (+0200) Subject: Null pointer exception in SALOMEDS_StudyManager::copy() X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d713c4ce250d368d0fb198f2fb4515fda9408e8;p=modules%2Fkernel.git Null pointer exception in SALOMEDS_StudyManager::copy() --- diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.cxx b/src/SALOMEDS/SALOMEDS_StudyManager.cxx index ba0a8f206..175c1ebaf 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.cxx @@ -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(theSO.get()); + if (!aSO) + return false; + bool ret; if (_isLocal) { SALOMEDS::Locker lock;