Improve error message when a driveline is missing

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11354 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-06-30 15:04:05 +00:00
parent 635ef93d8b
commit c77be89a27

View File

@ -30,8 +30,12 @@
* \param index Index of the quad to use for this node (in QuadSet).
*/
GraphNode::GraphNode(unsigned int quad_index, unsigned int node_index)
{
assert(quad_index<QuadSet::get()->getNumberOfQuads());
{
if (quad_index<QuadSet::get()->getNumberOfQuads() == 0)
{
fprintf(stderr, "[GraphNode] ERROR: No driveline found, or empty driveline");
abort();
}
m_quad_index = quad_index;
m_node_index = node_index;
m_predecessor = -1;