Handle missing setting gracefully.

This commit is contained in:
Teo Mrnjavac 2016-03-01 15:09:53 +01:00
parent 7b3f6cdd5a
commit 1d8330f1eb

View file

@ -149,7 +149,7 @@ Settings::Settings( const QString& settingsFilePath,
.as< std::string >() );
m_promptInstall = config[ "prompt-install" ].as< bool >();
m_doChroot = !config[ "dont-chroot" ].as< bool >();
m_doChroot = config[ "dont-chroot" ] ? !config[ "dont-chroot" ].as< bool >() : true;
}
catch ( YAML::Exception& e )
{