diff options
author | Willem Jan Palenstijn | 2013-10-02 00:41:44 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-10-02 00:41:18 +0200 |
commit | 92bd22b1d54b60d432dc148615eaea61503f8605 (patch) | |
tree | 707680c3e640a7ec4c1e7eca9637b53370581024 /engines/wintermute/base/gfx/osystem | |
parent | 023fedef48dd3c1fa40ddf2247900bc65ad91671 (diff) | |
download | scummvm-rg350-92bd22b1d54b60d432dc148615eaea61503f8605.tar.gz scummvm-rg350-92bd22b1d54b60d432dc148615eaea61503f8605.tar.bz2 scummvm-rg350-92bd22b1d54b60d432dc148615eaea61503f8605.zip |
WINTERMUTE: Fix regression in ticketing
This caused a crash when pressing 'New Game' in the Black Circle demo.
Regression from 544e4a2f49630cecbf06fe5b1e11bdbab1bdb281.
Diffstat (limited to 'engines/wintermute/base/gfx/osystem')
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 39691628ab..e9eea07b35 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -324,6 +324,7 @@ void BaseRenderOSystem::invalidateTicketsFromSurface(BaseSurfaceOSystem *surf) { void BaseRenderOSystem::drawFromTicket(RenderTicket *renderTicket) { renderTicket->_wantsDraw = true; + _drawNum++; ++_lastFrameIter; // In-order if (_renderQueue.empty() || _lastFrameIter == _renderQueue.end()) { @@ -354,6 +355,7 @@ void BaseRenderOSystem::drawFromQueuedTicket(const RenderQueueIterator &ticket) } else { --_lastFrameIter; // Remove the ticket from the list + assert(*_lastFrameIter != renderTicket); _renderQueue.erase(ticket); // Is not in order, so readd it as if it was a new ticket drawFromTicket(renderTicket); |