mirror of https://github.com/stella-emu/stella.git
Fix segfault on shutdown in certain cases (mostly if OSystem creation failed).
This commit is contained in:
parent
75bda25459
commit
6f1b0b0783
|
@ -242,14 +242,14 @@ void OSystem::loadConfig(const Settings::Options& options)
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void OSystem::saveConfig()
|
void OSystem::saveConfig()
|
||||||
|
{
|
||||||
|
// Ask all subsystems to save their settings
|
||||||
|
if(myFrameBuffer)
|
||||||
{
|
{
|
||||||
// Save the last windowed position and display on system shutdown
|
// Save the last windowed position and display on system shutdown
|
||||||
myFrameBuffer->updateWindowedPos();
|
myFrameBuffer->updateWindowedPos();
|
||||||
settings().setValue("display", myFrameBuffer->getCurrentDisplayIndex());
|
settings().setValue("display", myFrameBuffer->getCurrentDisplayIndex());
|
||||||
|
|
||||||
// Ask all subsystems to save their settings
|
|
||||||
if(myFrameBuffer)
|
|
||||||
{
|
|
||||||
Logger::debug("Saving TV effects options ...");
|
Logger::debug("Saving TV effects options ...");
|
||||||
myFrameBuffer->tiaSurface().ntsc().saveConfig(settings());
|
myFrameBuffer->tiaSurface().ntsc().saveConfig(settings());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue