Skip to content

Commit

Permalink
ENGINES: Disallow clearing an already clear pause token.
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik "Henke37" Andersson committed May 10, 2020
1 parent e621727 commit a5cc010
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/engine.cpp
Expand Up @@ -852,9 +852,10 @@ PauseToken::PauseToken(const PauseToken &t2) : _engine(t2._engine) {
}

void PauseToken::clear() {
if (_engine) {
_engine->resumeEngine();
if (!_engine) {
error("Tried to clear an already cleared PauseToken");
}
_engine->resumeEngine();
_engine = nullptr;
}

Expand Down

0 comments on commit a5cc010

Please sign in to comment.