From bce549f42a374e47c5de794c863d6cbe0842bfb4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 26 Jun 2011 16:09:38 +0300 Subject: SWORD25: Fix bug with loading saves when some saves are missing --- engines/sword25/gfx/staticbitmap.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/sword25/gfx') diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp index 60ad94e20f..0ae07b36b5 100644 --- a/engines/sword25/gfx/staticbitmap.cpp +++ b/engines/sword25/gfx/staticbitmap.cpp @@ -170,7 +170,10 @@ bool StaticBitmap::unpersist(InputPersistenceBlock &reader) { result &= Bitmap::unpersist(reader); Common::String resourceFilename; reader.readString(resourceFilename); - result &= initBitmapResource(resourceFilename); + // We may not have saves, and we actually do not need to + // restore them. So do not even try to load them. + if (!resourceFilename.hasPrefix("/saves")) + result &= initBitmapResource(resourceFilename); result &= RenderObject::unpersistChildren(reader); -- cgit v1.2.3