From a495675b714076a85ee34a9376be60666e6d8fb2 Mon Sep 17 00:00:00 2001 From: blacksun Date: Tue, 29 Nov 2016 20:24:27 +0000 Subject: [PATCH] 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 --- sources/autoNum/assignvariables.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index 60afff257..6122aa3fe 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -332,8 +332,9 @@ namespace autonum int dirLevel = -1; //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++; path[i]=current_location.fileName(); current_location = current_location.parent();