From: <au...@us...> - 2012-06-30 15:04:11
|
Revision: 11354 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=11354&view=rev Author: auria Date: 2012-06-30 15:04:05 +0000 (Sat, 30 Jun 2012) Log Message: ----------- Improve error message when a driveline is missing Modified Paths: -------------- main/trunk/src/tracks/graph_node.cpp Modified: main/trunk/src/tracks/graph_node.cpp =================================================================== --- main/trunk/src/tracks/graph_node.cpp 2012-06-30 02:09:58 UTC (rev 11353) +++ main/trunk/src/tracks/graph_node.cpp 2012-06-30 15:04:05 UTC (rev 11354) @@ -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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |