aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-10-09 20:29:26 +0000
committerMax Horn2002-10-09 20:29:26 +0000
commita00d1362e99493c7f11fb2329ca6851ceecac76e (patch)
tree262602adcce7e800ae393c8cfab0c344a829f2ed
parent06d5fe86f587e40718b47bea86d794bb99a6ee48 (diff)
downloadscummvm-rg350-a00d1362e99493c7f11fb2329ca6851ceecac76e.tar.gz
scummvm-rg350-a00d1362e99493c7f11fb2329ca6851ceecac76e.tar.bz2
scummvm-rg350-a00d1362e99493c7f11fb2329ca6851ceecac76e.zip
in error() use g_system instead of g_scumm->_system in order to support Simon; also check if g_system already exists, otherwise just call exit(1)
svn-id: r5117
-rw-r--r--scumm/scummvm.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 54f36e8ba4..9612a59b68 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1334,14 +1334,11 @@ void NORETURN CDECL error(const char *s, ...)
#endif
}
- // Finally exit. quit() will terminate the program
- g_scumm->_system->quit();
+ // Finally exit. quit() will terminate the program if g_system iss present
+ if (g_system)
+ g_system->quit();
-
- // This point should never be reached. However, since virtual methods (like quit() is)
- // can't be marked as noreturn, gcc will complain at this point. Thus we add in this
- // call to exit(0) even though it is never reached.
- exit(0);
+ exit(1);
}
ScummDebugger g_debugger;