Bug #1739 » 0032-team_slot_name_translation-Assert-correctly-on-nonls.patch
| common/team.c | ||
|---|---|---|
|
****************************************************************************/
|
||
|
const char *team_slot_name_translation(const struct team_slot *tslot)
|
||
|
{
|
||
|
#ifdef FREECIV_ENABLE_NLS
|
||
|
fc_assert_ret_val(team_slots_initialised(), nullptr);
|
||
|
#ifdef FREECIV_ENABLE_NLS
|
||
|
if (tslot->name_translation == nullptr) {
|
||
|
/* Get the team slot as changeable (not _const_) struct. */
|
||
|
struct team_slot *changeable
|
||
|
= team_slot_by_number(team_slot_index(tslot));
|
||
|
team_slot_create_default_name(changeable);
|
||
|
return changeable->name_translation;
|
||
|
}
|
||