Bug fix : crash if an embedded element haven't got directory "import" as parent

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4794 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-11-29 20:24:27 +00:00
parent 489f2c2035
commit a495675b71

View File

@@ -332,8 +332,9 @@ namespace autonum
int dirLevel = -1; int dirLevel = -1;
//Add location name to path array //Add location name to path array
while(current_location.parent().fileName() != "import") while((current_location.parent() != current_location) && (current_location.parent().fileName() != "import"))
{ {
qDebug() << "i = " << i << " " << current_location.fileName();
i++; i++;
path[i]=current_location.fileName(); path[i]=current_location.fileName();
current_location = current_location.parent(); current_location = current_location.parent();