From da8682a6da7b5a72b3b6adbbedb4272f5d7ef2e7 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 15 Feb 2013 16:05:13 +0000 Subject: [PATCH] Error protection on DataArray*::setPartOfValuesAdv --- src/MEDCoupling/MEDCouplingMemArray.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index 218e05397..a74b583bd 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -1521,7 +1521,7 @@ void DataArrayDouble::setPartOfValuesSimple3(double a, const int *bgTuples, cons */ void DataArrayDouble::setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception) { - if(!a) + if(!a || !tuplesSelec) throw INTERP_KERNEL::Exception("DataArrayDouble::setPartOfValuesAdv : input DataArrayDouble is NULL !"); checkAllocated(); a->checkAllocated(); @@ -4878,7 +4878,7 @@ void DataArrayInt::setPartOfValuesSimple3(int a, const int *bgTuples, const int */ void DataArrayInt::setPartOfValuesAdv(const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception) { - if(!a) + if(!a || !tuplesSelec) throw INTERP_KERNEL::Exception("DataArrayInt::setPartOfValuesAdv : DataArrayInt pointer in input is NULL !"); checkAllocated(); a->checkAllocated(); -- 2.39.2