ENGINES: Disallow clearing an already clear pause token.

This commit is contained in:
Henrik "Henke37" Andersson 2020-05-10 23:15:55 +02:00 committed by Eugene Sandulenko
parent 830a239b04
commit 1b4ce9096f

View File

@ -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;
}