Handle OSystem::lockScreen fail in default OSystem::clearScreen implementation.

svn-id: r34276
This commit is contained in:
Johannes Schickel 2008-09-02 13:11:54 +00:00
parent c41e1d9ded
commit 3ea8f70792

View File

@ -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();
}