From: ibs Date: Fri, 22 Jul 2016 13:02:30 +0000 (+0300) Subject: 0027706: Foundation Classes - OSD_Path::DownTrek() crashes on empty argument X-Git-Tag: V7_1_0_beta~236 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=4c6b4bc75a0e234aa60a64764cb4dca4fbb686f2;p=occt.git 0027706: Foundation Classes - OSD_Path::DownTrek() crashes on empty argument a required check added --- diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx index c434dbe7f6..5ceb3669b1 100644 --- a/src/OSD/OSD_Path.cxx +++ b/src/OSD/OSD_Path.cxx @@ -1085,7 +1085,7 @@ void OSD_Path :: DownTrek ( const TCollection_AsciiString& aName ) { Standard_Integer pos = myTrek.Length (); - if ( aName.Value ( 1 ) != '|' && + if ( !aName.IsEmpty() && aName.Value ( 1 ) != '|' && pos && myTrek.Value ( pos ) != '|' )