From 5d713c4ce250d368d0fb198f2fb4515fda9408e8 Mon Sep 17 00:00:00 2001 From: abn Date: Tue, 18 Apr 2017 14:57:06 +0200 Subject: [PATCH] Null pointer exception in SALOMEDS_StudyManager::copy() --- src/SALOMEDS/SALOMEDS_StudyManager.cxx | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2