Fixed crash when an incorrect kart name was specified
on the command line (--kart). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1491 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
90972ce605
commit
c2ad6c856b
@ -144,7 +144,12 @@ int handleCmdLine(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else if( (!strcmp(argv[i], "--kart") && i+1<argc ))
|
else if( (!strcmp(argv[i], "--kart") && i+1<argc ))
|
||||||
{
|
{
|
||||||
race_manager->setPlayerKart(0, argv[i+1]);
|
if(!kart_properties_manager->getKart(argv[i+1]))
|
||||||
|
{
|
||||||
|
fprintf(stdout, _("Kart '%s' not found, ignored.\n"),
|
||||||
|
argv[i+1]);
|
||||||
|
}
|
||||||
|
else race_manager->setPlayerKart(0, argv[i+1]);
|
||||||
}
|
}
|
||||||
else if( (!strcmp(argv[i], "--mode") && i+1<argc ))
|
else if( (!strcmp(argv[i], "--mode") && i+1<argc ))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user