From: ageay Date: Fri, 15 Feb 2013 16:05:13 +0000 (+0000) Subject: Error protection on DataArray*::setPartOfValuesAdv X-Git-Tag: V6_main_FINAL~352 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da8682a6da7b5a72b3b6adbbedb4272f5d7ef2e7;p=tools%2Fmedcoupling.git Error protection on DataArray*::setPartOfValuesAdv --- 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();