mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 10:38:13 +00:00
Validate a pointer before deferring it.
Issue found by cppcheck.
This commit is contained in:
parent
b7a5056a4a
commit
23680e0a13
@ -178,6 +178,8 @@ void battle_prediction_pane::get_unit_strings(const battle_context_unit_stats& s
|
|||||||
str << weapon->damage();
|
str << weapon->damage();
|
||||||
right_strings.push_back(str.str());
|
right_strings.push_back(str.str());
|
||||||
} else {
|
} else {
|
||||||
|
assert(set_dmg_effect->ability);
|
||||||
|
|
||||||
left_strings.push_back((*set_dmg_effect->ability)["name"]);
|
left_strings.push_back((*set_dmg_effect->ability)["name"]);
|
||||||
str.str("");
|
str.str("");
|
||||||
str << set_dmg_effect->value;
|
str << set_dmg_effect->value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user