From: eap Date: Thu, 26 Apr 2012 14:32:55 +0000 (+0000) Subject: PAL22862: GHS3D gives OCC exception X-Git-Tag: TRIPOLI_323~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2f82761f83d55f573aeb2091b1be762d6fc8b998;p=modules%2Fsmesh.git PAL22862: GHS3D gives OCC exception BUG: !more() if the 1st iterator !more() --- diff --git a/src/SMDS/SMDS_IteratorOnIterators.hxx b/src/SMDS/SMDS_IteratorOnIterators.hxx index 6a3a2170c..105edfdc1 100644 --- a/src/SMDS/SMDS_IteratorOnIterators.hxx +++ b/src/SMDS/SMDS_IteratorOnIterators.hxx @@ -46,7 +46,10 @@ protected: typename CONTAINER_OF_ITERATORS::iterator _beg, _end; public: SMDS_IteratorOnIterators(const CONTAINER_OF_ITERATORS& iterators): - _iterators( iterators ), _beg( _iterators.begin()), _end(_iterators.end() ) {} + _iterators( iterators ), _beg( _iterators.begin()), _end(_iterators.end() ) + { + while ( _beg != _end && !(*_beg)->more()) ++_beg; + } /// Return true iff there are other object in this iterator virtual bool more() { return _beg != _end && (*_beg)->more(); }