From: sln Date: Thu, 24 May 2007 09:12:43 +0000 (+0000) Subject: Protection from exception. Additional verification added in setTitle method (NPAL15945) X-Git-Tag: T15881~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=96699510a396c101b20ccd4bd2708940fe578feb;p=modules%2Fvisu.git Protection from exception. Additional verification added in setTitle method (NPAL15945) --- diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 309473f1..acc98b04 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -302,8 +302,13 @@ VISU::ColoredPrs3d_i { // mkr : IPAL14030 std::strstream aStream; + if ( !myField ) + return; const VISU::TValField& aValField = myField->myValField; - const VISU::PValForTime aValForTime = aValField.find(myIteration)->second; + VISU::TValField::const_iterator anIter = aValField.find(myIteration); + if ( anIter == aValField.end() ) + return; + const VISU::PValForTime aValForTime = anIter->second; aStream<myTime)<myValField; - const VISU::PValForTime aValForTime = aValField.find(myScalarIteration)->second; + VISU::TValField::const_iterator anIter = aValField.find(myScalarIteration); + if ( anIter == aValField.end() ) + return; + const VISU::PValForTime aValForTime = anIter->second; if(aValForTime){ aStream<myTime)<