AGS: Engine: safety hotfix for render pass without sprite batches

Partially from upstream 7ad4f424f473f480c830faf3f7a2aca4388aa8fe
This commit is contained in:
Walter Agazzi 2023-03-05 12:50:39 +01:00 committed by Eugene Sandulenko
parent d025390cfc
commit e402e69539

View File

@ -369,6 +369,11 @@ void ScummVMRendererGraphicsDriver::RenderToBackBuffer() {
while (_actSpriteBatch != UINT32_MAX)
EndSpriteBatch();
if (_spriteBatchDesc.size() == 0) {
ClearDrawLists();
return; // no batches - no render
}
// Render all the sprite batches with necessary transformations
//
// NOTE: that's not immediately clear whether it would be faster to first draw upon a camera-sized