Fixed crash that could occur if ValidateFrame is called again before _runningTest is set to false at the end of a test

This commit is contained in:
Souryo 2015-12-29 16:14:29 -05:00
parent 76e060907d
commit b6fc3471f8

View file

@ -59,9 +59,11 @@ void AutoRomTest::ValidateFrame(uint16_t* ppuFrameBuffer)
if(memcmp(_screenshotHashes.front(), md5Hash, 16) != 0) { if(memcmp(_screenshotHashes.front(), md5Hash, 16) != 0) {
_testResult = false; _testResult = false;
_runningTest = false;
_signal.Signal(); _signal.Signal();
} else if (_currentCount == 0 && _repetitionCount.empty()) { } else if (_currentCount == 0 && _repetitionCount.empty()) {
//End of test //End of test
_runningTest = false;
_signal.Signal(); _signal.Signal();
} }
} }