Fix problem with viewing unit descriptions for hidden units

This applies when a specific unit of that type is available, for example
in the recall dialog.
This commit is contained in:
Celtic Minstrel 2016-12-10 20:50:01 -05:00
parent 057749bd76
commit 87d92119f3

View file

@ -493,7 +493,10 @@ void unit_preview_pane::set_displayed_unit(const unit& u)
void unit_preview_pane::profile_button_callback()
{
if(get_window()) {
help::show_unit_help((*get_window()).video(), current_type_);
const unit_type* ut = unit_types.find(current_type_);
if(ut != nullptr) {
help::show_unit_description((*get_window()).video(), *ut);
}
}
}