Merge pull request #680 from stoofin/fix-crash

Fix failed assert when asked to clear an empty rect
This commit is contained in:
Autechre 2020-06-19 07:11:41 +02:00 committed by GitHub
commit 409ac1b174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -468,6 +468,10 @@ void TextureTracker::clearRegion(Rect rect) {
if (blit_log != nullptr) {
blit_log->clear(rect);
}
if (rect.width == 0 || rect.height == 0) {
// Some games do this, apparently.
return;
}
tracker.clear(toSRect(rect));
fused_pages.mark_dead(rect);