Fix a segfault when deleting a non existing editor label.
This commit is contained in:
parent
f8523fe2dd
commit
5e0d4a08ce
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ editor_action* editor_action_label_delete::perform(map_context& mc) const
|
|||
|
||||
const terrain_label* deleted = mc.get_labels().get_label(loc_);
|
||||
|
||||
if (!deleted) return NULL;
|
||||
|
||||
undo.reset(new editor_action_label(loc_, deleted->text(), deleted->team_name()
|
||||
, deleted->color(), deleted->visible_in_fog(), deleted->visible_in_shroud(), deleted->immutable()));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue