aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-02 13:11:54 +0000
committerJohannes Schickel2008-09-02 13:11:54 +0000
commit3ea8f70792b62c70bfcae97b970e3830d85c5d72 (patch)
tree375e2162ec4e88cfed33a5f4e6e30372f4e98055 /common
parentc41e1d9ded3f03f73c9c7f28cf483114c1924edb (diff)
downloadscummvm-rg350-3ea8f70792b62c70bfcae97b970e3830d85c5d72.tar.gz
scummvm-rg350-3ea8f70792b62c70bfcae97b970e3830d85c5d72.tar.bz2
scummvm-rg350-3ea8f70792b62c70bfcae97b970e3830d85c5d72.zip
Handle OSystem::lockScreen fail in default OSystem::clearScreen implementation.
svn-id: r34276
Diffstat (limited to 'common')
-rw-r--r--common/system.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/system.cpp b/common/system.cpp
index d0548cdd2d..863f395671 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -115,7 +115,8 @@ Common::EventManager *OSystem::getEventManager() {
void OSystem::clearScreen() {
Graphics::Surface *screen = lockScreen();
- memset(screen->pixels, 0, screen->h * screen->pitch);
+ if (screen && screen->pixels)
+ memset(screen->pixels, 0, screen->h * screen->pitch);
unlockScreen();
}