summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models/parsetreenode.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-08-05 08:49:34 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-08-05 08:49:34 +0000
commitf657e491036e971725bb963e03775b43c4ecbda4 (patch)
treefb7d33aeadc576b73d75bb06c6326708240ce38e /utils/themeeditor/models/parsetreenode.cpp
parent265ee156f23fd166d29af89f8b9a778e46354c38 (diff)
downloadrockbox-f657e491036e971725bb963e03775b43c4ecbda4.tar.gz
rockbox-f657e491036e971725bb963e03775b43c4ecbda4.tar.bz2
rockbox-f657e491036e971725bb963e03775b43c4ecbda4.zip
Theme Editor: Fixed bug that crashed conditionals nested in sublines, began work on making progress bars implement RBMovable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27714 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models/parsetreenode.cpp')
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index 443d0327f5..4afd04ab9d 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -1065,6 +1065,9 @@ double ParseTreeNode::findConditionalTime(ParseTreeNode *conditional,
{
int child = conditional->evalTag(info, true,
conditional->children.count()).toInt();
+ if(child >= conditional->children.count())
+ child = conditional->children.count() - 1;
+
return findBranchTime(conditional->children[child], info);
}