aboutsummaryrefslogtreecommitdiff
path: root/common/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/system.cpp')
-rw-r--r--common/system.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/system.cpp b/common/system.cpp
index d0548cdd2d..d9bc027e91 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();
}
@@ -125,10 +126,9 @@ FIXME: The config file loading code below needs to be cleaned up.
Port specific variants should be pushed into the respective ports.
Ideally, the default OSystem::openConfigFileForReading/Writing methods
- should be removed completely.
+ should be removed completely.
*/
-#include "common/file.h"
#ifdef __PLAYSTATION2__
#include "backends/platform/ps2/systemps2.h"
@@ -163,7 +163,7 @@ static Common::String getDefaultConfigFileName() {
}
Common::SeekableReadStream *OSystem::openConfigFileForReading() {
- FilesystemNode file(getDefaultConfigFileName());
+ Common::FilesystemNode file(getDefaultConfigFileName());
return file.openForReading();
}
@@ -171,7 +171,7 @@ Common::WriteStream *OSystem::openConfigFileForWriting() {
#ifdef __DC__
return 0;
#else
- FilesystemNode file(getDefaultConfigFileName());
+ Common::FilesystemNode file(getDefaultConfigFileName());
return file.openForWriting();
#endif
}