PyObject *getMesh2D() const throw(INTERP_KERNEL::Exception)
{
MEDCouplingUMesh *ret=self->getMesh2D();
- ret->incrRef();
+ if(ret)
+ ret->incrRef();
return convertMesh(ret, SWIG_POINTER_OWN | 0 );
}
PyObject *getMesh1D() const throw(INTERP_KERNEL::Exception)
{
MEDCouplingUMesh *ret=self->getMesh1D();
- ret->incrRef();
+ if(ret)
+ ret->incrRef();
return convertMesh(ret, SWIG_POINTER_OWN | 0 );
}
PyObject *getMesh3DIds() const throw(INTERP_KERNEL::Exception)
{
DataArrayInt *ret=self->getMesh3DIds();
- ret->incrRef();
+ if(ret)
+ ret->incrRef();
return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
}
}
PyObject *getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception)
{
const MEDFileFieldLoc *loc=&self->getLocalizationFromId(locId);
- loc->incrRef();
+ if(loc)
+ loc->incrRef();
return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_ParaMEDMEM__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
}
PyObject *getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception)
{
const MEDFileFieldLoc *loc=&self->getLocalization(locName);
- loc->incrRef();
+ if(loc)
+ loc->incrRef();
return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_ParaMEDMEM__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
}