Fix crash when user preference is missing.

This commit is contained in:
cc9cii 2015-06-25 20:21:51 +10:00
parent e29d9bcc8e
commit 71f3b7ed4f

View file

@ -120,7 +120,7 @@ void CSMTools::ScriptCheckStage::perform (int stage, CSMDoc::Messages& messages)
void CSMTools::ScriptCheckStage::updateUserSetting (const QString& name, const QStringList& value)
{
if (name=="script-editor/warnings")
if (name=="script-editor/warnings" && !value.isEmpty())
{
if (value.at (0)=="Ignore")
mWarningMode = Mode_Ignore;