aboutsummaryrefslogtreecommitdiff
path: root/graphics/managed_surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-12-03 13:10:41 -0500
committerPaul Gilbert2017-12-03 13:10:41 -0500
commit4fbf11db90bec294038fd344936eb895cbe343e1 (patch)
tree701141665f59793ca3c30847ecf627aaeffae0f5 /graphics/managed_surface.cpp
parent3a933138ce9273724726efc0df051b8dcf92b7d8 (diff)
downloadscummvm-rg350-4fbf11db90bec294038fd344936eb895cbe343e1.tar.gz
scummvm-rg350-4fbf11db90bec294038fd344936eb895cbe343e1.tar.bz2
scummvm-rg350-4fbf11db90bec294038fd344936eb895cbe343e1.zip
GRAPHICS: Fix ManagedSurface clear calls when no surface is set
Diffstat (limited to 'graphics/managed_surface.cpp')
-rw-r--r--graphics/managed_surface.cpp3
1 files changed, 2 insertions, 1 deletions
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