Inappopriate error() exit approach
|Reported by:||SF/jamieson630||Owned by:||SF/ender|
The error() function used far and wide across ScummVM
attempts to exit the program using exit(1). This type of
bailout fails to properly shut down supporting systems
and often results in processor faults (seg fault, page
This patch replaces exit(1) with a call to the system
shutdown function OSystem_SDL_Common::quit().
Note that there are 33 other active occurrences of exit(1)
within ScummVM, and they may also consitute
inappropriate bailouts that cause processor faults. It
may be advisable to review these to see if a cleaner exit
approach could be applied.
Ticket imported from: #610251. Ticket imported from: patches/158.