From f43c6d73d79ee24a45795ab6c2c5e467c425bc1e Mon Sep 17 00:00:00 2001 From: bruneton Date: Thu, 21 Mar 2013 15:21:32 +0000 Subject: [PATCH] Bug fix: SWIG'd getCoords() detects properly null pointer _coords. --- src/MEDCoupling_Swig/MEDCouplingCommon.i | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.2