X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_PythonDump.cxx;h=60940d941fd39ac89fa16d120daaf1fdcc4fbbc5;hb=4d98127e08ba65528b767e92a0c8780aa8b5c811;hp=985136d7078683377c684f0087b6e0362372c805;hpb=438f4b0922bde24be526d18c3cee98bdaea52642;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_PythonDump.cxx b/src/GEOM/GEOM_PythonDump.cxx index 985136d70..60940d941 100644 --- a/src/GEOM/GEOM_PythonDump.cxx +++ b/src/GEOM/GEOM_PythonDump.cxx @@ -15,7 +15,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com #include "GEOM_PythonDump.hxx" @@ -104,9 +104,13 @@ namespace GEOM TPythonDump& TPythonDump::operator<< (const Handle(GEOM_Object)& theObject) { - TCollection_AsciiString anEntry; - TDF_Tool::Entry(theObject->GetEntry(), anEntry); - myStream << anEntry.ToCString(); + if (theObject.IsNull()) { + myStream << "None"; + } else { + TCollection_AsciiString anEntry; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + myStream << anEntry.ToCString(); + } return *this; } @@ -120,7 +124,7 @@ namespace GEOM TDF_Tool::TagList(theObj1->GetEntry(), aTags1); TDF_Tool::TagList(theObj2->GetEntry(), aTags2); TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2); - for (; aListIter1.More(); aListIter1.Next()) { + for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) { if (!aListIter2.More()) return theObj1; // anObj1 is stored under anObj2