From 4fbf11db90bec294038fd344936eb895cbe343e1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 3 Dec 2017 13:10:41 -0500 Subject: GRAPHICS: Fix ManagedSurface clear calls when no surface is set --- graphics/managed_surface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp index 60b2941efa..1595a32ecb 100644 --- a/graphics/managed_surface.cpp +++ b/graphics/managed_surface.cpp @@ -335,7 +335,8 @@ void ManagedSurface::addDirtyRect(const Common::Rect &r) { } void ManagedSurface::clear(uint color) { - fillRect(getBounds(), color); + if (!empty()) + fillRect(getBounds(), color); } } // End of namespace Graphics -- cgit v1.2.3