Fixed crash by moving scene_node->setName AFTER checking that scene_node is not null
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7947 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5a9a09a59e
commit
5d56ff3778
@ -865,16 +865,18 @@ void Track::createWater(const XMLNode &node)
|
||||
scene_node = irr_driver->addMesh(mesh);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
std::string debug_name = model_name+"(water node)";
|
||||
scene_node->setName(debug_name.c_str());
|
||||
#endif
|
||||
if(!mesh || !scene_node)
|
||||
{
|
||||
fprintf(stderr, "Warning: Water model '%s' in '%s' not found, ignored.\n",
|
||||
node.getName().c_str(), model_name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
std::string debug_name = model_name+"(water node)";
|
||||
scene_node->setName(debug_name.c_str());
|
||||
#endif
|
||||
|
||||
mesh->grab();
|
||||
m_all_meshes.push_back(mesh);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user