Skip to content

Commit

Permalink
Fall back to variation_name if variation_id is not present (bug #21280)
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 committed Jan 13, 2014
1 parent 714bae2 commit 724dd0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dialogs.cpp
Expand Up @@ -1414,7 +1414,9 @@ void show_terrain_description(const terrain_type &t)

void show_unit_description(const unit_type &t)
{
const std::string& var_id = t.get_cfg()["variation_id"];
std::string var_id = t.get_cfg()["variation_id"].str();
if (var_id.empty())
var_id = t.get_cfg()["variation_name"].str();
bool hide_help = t.hide_help();
bool use_variation = false;
if (!var_id.empty()) {
Expand Down

0 comments on commit 724dd0f

Please sign in to comment.