Skip to content

Commit

Permalink
Fix assertion when opening the gamestate inspector while disabled eve…
Browse files Browse the repository at this point in the history
…nts haven't been cleaned up

Fixes #3257
  • Loading branch information
CelticMinstrel committed Jul 19, 2022
1 parent 5001999 commit 08b4fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game_events/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void manager::write_events(config& cfg, bool include_nonserializable) const
// have been flagged as disabled by this point (such events are disabled before their
// actions are run). If a disabled event is encountered outside an event context,
// however, assert. That means something went wrong with event list cleanup.
if(eh->disabled() && is_event_running()) {
if(eh->disabled() && (is_event_running() || include_nonserializable)) {
continue;
} else {
assert(!eh->disabled());
Expand Down

0 comments on commit 08b4fc5

Please sign in to comment.