From: bruneton Date: Thu, 21 Mar 2013 15:21:32 +0000 (+0000) Subject: Bug fix: SWIG'd getCoords() detects properly null pointer _coords. X-Git-Tag: V6_main_FINAL~252 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f43c6d73d79ee24a45795ab6c2c5e467c425bc1e;p=tools%2Fmedcoupling.git Bug fix: SWIG'd getCoords() detects properly null pointer _coords. --- diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 1e4a99e7a..c5e060582 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -2064,7 +2064,8 @@ namespace ParaMEDMEM PyObject *getCoords() throw(INTERP_KERNEL::Exception) { DataArrayDouble *ret1=self->getCoords(); - ret1->incrRef(); + if (ret1) + ret1->incrRef(); return SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_ParaMEDMEM__DataArrayDouble,SWIG_POINTER_OWN | 0); }