changed some asserts in explicit error checks.

This commit is contained in:
Marco Di Benedetto 2010-10-13 12:53:30 +00:00
parent da757efdd3
commit 421ae17fb4
1 changed files with 6 additions and 2 deletions

View File

@ -862,7 +862,9 @@ static Matrix44f getTransfMatrixFromNode(const QDomElement parentNode)
geoinst_found |= true; geoinst_found |= true;
QDomNodeList geolib = info.doc->elementsByTagName("library_geometries"); QDomNodeList geolib = info.doc->elementsByTagName("library_geometries");
assert(geolib.size() == 1); //assert(geolib.size() == 1);
if (geolib.size() != 1)
return false;
//!!!!!!!!!!!!!!!!!here will be the code for geometry transformations!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!here will be the code for geometry transformations!!!!!!!!!!!!!!!!!!!!!!
info.numvert = 0; info.numvert = 0;
info.numface = 0; info.numface = 0;
@ -924,7 +926,9 @@ static Matrix44f getTransfMatrixFromNode(const QDomElement parentNode)
if (!geoinst_found) if (!geoinst_found)
{ {
QDomNodeList geolib = info.doc->elementsByTagName("library_geometries"); QDomNodeList geolib = info.doc->elementsByTagName("library_geometries");
assert(geolib.size() == 1); //assert(geolib.size() == 1);
if (geolib.size() != 1)
return false;
QDomNodeList geochild = geolib.at(0).toElement().elementsByTagName("geometry"); QDomNodeList geochild = geolib.at(0).toElement().elementsByTagName("geometry");
//!!!!!!!!!!!!!!!!!here will be the code for geometry transformations!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!here will be the code for geometry transformations!!!!!!!!!!!!!!!!!!!!!!
info.numvert = 0; info.numvert = 0;