From: rnv Date: Fri, 18 Sep 2015 08:11:00 +0000 (+0300) Subject: Fix for the issue: 23161: EDF 11207 - SIGSEGV using ExtractCellType python method. X-Git-Tag: V7_7_0b1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=339ebdf2656036dfb91b4be816ec23d864210790;p=modules%2Fparavis.git Fix for the issue: 23161: EDF 11207 - SIGSEGV using ExtractCellType python method. --- diff --git a/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx b/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx index 48d0af46..d85af92c 100644 --- a/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx +++ b/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx @@ -210,14 +210,29 @@ const ExtractCellTypeStatus& vtkExtractCellType::vtkExtractCellTypeInternal::get bool vtkExtractCellType::vtkExtractCellTypeInternal::getStatusOfEntryStr(const char *entry) const { - const ExtractCellTypeStatus& elt(getEntry(entry)); - return elt.getStatus(); + try + { + const ExtractCellTypeStatus& elt(getEntry(entry)); + return elt.getStatus(); + } + catch (INTERP_KERNEL::Exception e) + { + //std::cerr << vtkDebugMacro"Exception has been thrown in vtkExtractCellType::vtkExtractCellTypeInternal::getStatusOfEntryStr : " << e.what() << std::endl; + return false; + } } void vtkExtractCellType::vtkExtractCellTypeInternal::setStatusOfEntryStr(const char *entry, bool status) const { - const ExtractCellTypeStatus& elt(getEntry(entry)); - elt.setStatus(status); + try + { + const ExtractCellTypeStatus& elt(getEntry(entry)); + elt.setStatus(status); + } + catch (INTERP_KERNEL::Exception e) + { + //std::cerr << "Exception has been thrown in vtkExtractCellType::vtkExtractCellTypeInternal::setStatusOfEntryStr : " << e.what() << std::endl; + } } void vtkExtractCellType::vtkExtractCellTypeInternal::printMySelf(std::ostream& os) const