Fixed possible crash in debug mode, thanks to curaga.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12661 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-04-15 21:49:48 +00:00
parent 8ed288e81d
commit f2aeedc41f

View File

@ -100,9 +100,11 @@ void Camera::setKart(AbstractKart *new_kart)
{
m_kart = new_kart;
#ifdef DEBUG
std::string name = new_kart->getIdent()+"'s camera";
if(new_kart)
{
std::string name = new_kart->getIdent()+"'s camera";
getCameraSceneNode()->setName(name.c_str() );
}
#endif
} // setKart