From de014ec97178b36a2aa2f8e6fe958bd7211620c7 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 31 Dec 2003 12:32:34 +0000 Subject: fix segfault svn-id: r12049 --- sword1/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sword1') diff --git a/sword1/control.cpp b/sword1/control.cpp index 8a0b0207f1..ffc613893b 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -517,7 +517,7 @@ bool SwordControl::savegamesExist(void) { SaveFileManager *mgr = _system->get_savefile_manager(); SaveFile *inf; inf = mgr->open_savefile("SAVEGAME.INF", _savePath, SAVEFILE_READ); - if (inf->isOpen()) + if (inf && inf->isOpen()) retVal = true; delete inf; delete mgr; -- cgit v1.2.3