mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 18:17:20 +00:00
Editor: second attempt to fix crash when closing map (bug #25680)
This commit is contained in:
parent
9742a15046
commit
bac460baef
@ -92,7 +92,13 @@ public:
|
||||
|
||||
context_manager_.reload_map();
|
||||
|
||||
current_labels->enable(false);
|
||||
// In the case of switching contexts, this is needed to hide the labels in the previous context.
|
||||
// However, if a context is already, destroyed before reaching this point (such as happens when
|
||||
// closing a map), do nothing; destroying the context also clears its labels.
|
||||
if(current_labels) {
|
||||
current_labels->enable(false);
|
||||
}
|
||||
|
||||
current_labels = &context_manager_.get_map_context().get_labels();
|
||||
current_labels->enable(true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user