aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r--engines/wintermute/base/saveload.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index bafe8a7a51..1549eac7a8 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -173,12 +173,10 @@ Common::String SaveLoad::getSaveSlotDescription(int slot) {
Common::String description;
Common::String filename = getSaveSlotFilename(slot);
BasePersistenceManager *pm = new BasePersistenceManager();
- if (pm) {
- if ((pm->initLoad(filename))) {
- description = pm->_savedDescription;
- }
- delete pm;
+ if ((pm->initLoad(filename))) {
+ description = pm->_savedDescription;
}
+ delete pm;
return description;
}
@@ -186,12 +184,10 @@ void SaveLoad::getSaveSlotTimestamp(int slot, TimeDate *time) {
memset(time, 0, sizeof(TimeDate));
Common::String filename = getSaveSlotFilename(slot);
BasePersistenceManager *pm = new BasePersistenceManager();
- if (pm) {
- if ((pm->initLoad(filename))) {
- *time = pm->getSavedTimestamp();
- }
- delete pm;
+ if ((pm->initLoad(filename))) {
+ *time = pm->getSavedTimestamp();
}
+ delete pm;
}
bool SaveLoad::isSaveSlotUsed(int slot) {