slightly improved the robusness of the valuestringlist function in collada parsing

This commit is contained in:
Paolo Cignoni 2009-11-17 23:32:09 +00:00
parent ebcbc5f98d
commit 9a137ad9ef
1 changed files with 5 additions and 0 deletions

View File

@ -309,6 +309,11 @@ namespace io {
assert(list.size() == 1); assert(list.size() == 1);
QString nd = list.at(0).firstChild().nodeValue(); QString nd = list.at(0).firstChild().nodeValue();
res = nd.simplified().split(" ",QString::SkipEmptyParts); res = nd.simplified().split(" ",QString::SkipEmptyParts);
if(res.empty())
{
qDebug("Warning valueStringList returned and emtpy list. nothing inside element with tag '%s'", qPrintable(tag));
return;
}
if (res.last() == "") if (res.last() == "")
res.removeLast(); res.removeLast();