Fixed crash when race starts after qualification (was probably a D16 or D30 regression)

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2899 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: b9a534e89e8bd4a4ffa1cec5c66ef4c19da2ab04
Former-commit-id: c19ec70ce77e4c58ca6897df7a338e6b64339bf8
This commit is contained in:
pouillot 2010-10-16 16:39:49 +00:00
parent 00b35091eb
commit 1e0fdc155d

View file

@ -302,6 +302,7 @@ rmDisplayStartRace(tRmInfo *info, void *startScr, void *abortScr, int start)
robotIdx = (int)GfParmGetNum(info->params, path, RM_ATTR_IDX, NULL, 0);
extended = GfParmGetNum(info->params, path, RM_ATTR_EXTENDED, NULL, 0);
carName = NULL;
robhdle = NULL;
if( extended )
{
@ -312,12 +313,14 @@ rmDisplayStartRace(tRmInfo *info, void *startScr, void *abortScr, int start)
{
sprintf(path, "%sdrivers/%s/%s.xml", GetLocalDir(), name, name);
robhdle = GfParmReadFile(path, GFPARM_RMODE_STD);
if (!robhdle) {
if (!robhdle)
{
sprintf(path, "drivers/%s/%s.xml", name, name);
robhdle = GfParmReadFile(path, GFPARM_RMODE_STD);
}
if (robhdle) {
if (robhdle)
{
sprintf(path, "%s/%s/%d", ROB_SECT_ROBOTS, ROB_LIST_INDEX, robotIdx);
name = GfParmGetStr(robhdle, path, ROB_ATTR_NAME, "<none>");
carName = GfParmGetStr(robhdle, path, ROB_ATTR_CAR, "");