From 90816bc471e8aa1fc9157fb92aae3a3a140c3dbe Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Tue, 25 Dec 2018 18:57:51 +0100 Subject: [PATCH] now fixed --- src/include/multi_array_base.cc.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/include/multi_array_base.cc.h b/src/include/multi_array_base.cc.h index d38c601..ff7a2cb 100644 --- a/src/include/multi_array_base.cc.h +++ b/src/include/multi_array_base.cc.h @@ -13,7 +13,9 @@ namespace MultiArrayTools mInit(in.mInit), mRange(in.mRange) { - mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + if(mRange){ + mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + } } @@ -22,7 +24,9 @@ namespace MultiArrayTools mInit(in.mInit), mRange(in.mRange) { - mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + if(mRange){ + mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + } } template @@ -30,7 +34,9 @@ namespace MultiArrayTools { mInit = in.mInit; mRange = in.mRange; - mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + if(mRange){ + mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + } return *this; } @@ -39,7 +45,9 @@ namespace MultiArrayTools { mInit = in.mInit; mRange = in.mRange; - mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + if(mRange){ + mProtoI = std::make_shared( mRange, reinterpret_cast(this) ); + } return *this; }