Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fall back to variation_name if variation_id is not present (bug #21280)

  • Loading branch information...
commit 724dd0f9491babb4b8733f395c2363f06a20c1bf 1 parent 714bae2
@AI0867 AI0867 authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/dialogs.cpp
View
4 src/dialogs.cpp
@@ -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()) {
Please sign in to comment.
Something went wrong with that request. Please try again.