ENGINES: Disallow assignment to a busy pause token.

This commit is contained in:
Henrik "Henke37" Andersson 2020-05-10 23:11:46 +02:00 committed by Eugene Sandulenko
parent 8079dc8d72
commit f5ac623cca

View File

@ -836,12 +836,8 @@ PauseToken::PauseToken() : _engine(nullptr) {}
PauseToken::PauseToken(Engine *engine) : _engine(engine) {}
void PauseToken::operator=(const PauseToken &t2) {
if (t2._engine == _engine) {
return;
}
if (_engine) {
_engine->resumeEngine();
error("Tried to assign to an already busy PauseToken");
}
_engine = t2._engine;
if (_engine) {