forked from github/server
fix creating factions with invalid race (return nil)
This commit is contained in:
parent
4513a8749b
commit
82926318c0
|
@ -351,7 +351,7 @@ static int tolua_faction_create(lua_State * L)
|
||||||
f = addfaction(email, NULL, frace, loc, 0);
|
f = addfaction(email, NULL, frace, loc, 0);
|
||||||
}
|
}
|
||||||
if (!f) {
|
if (!f) {
|
||||||
log_error("faction.create(%s, %s, %s)\n", email, frace->_name, locale_name(loc));
|
log_error("faction.create(%s, %s, %s)\n", email, racename, locale_name(loc));
|
||||||
}
|
}
|
||||||
tolua_pushusertype(L, f, TOLUA_CAST "faction");
|
tolua_pushusertype(L, f, TOLUA_CAST "faction");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue