diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java index 205fffce6c..96f40c3296 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java @@ -274,10 +274,13 @@ public final class SettingsFile current = sectionFromLine(line); sections.put(current.getName(), current); } - else if ((current != null) && line.contains("=")) + else if ((current != null)) { Setting setting = settingFromLine(current, line, fileName); - current.putSetting(setting); + if (setting != null) + { + current.putSetting(setting); + } } } } @@ -381,6 +384,12 @@ public final class SettingsFile { String[] splitLine = line.split("="); + if (splitLine.length != 2) + { + Log.warning("Skipping invalid config line \"" + line + "\""); + return null; + } + String key = splitLine[0].trim(); String value = splitLine[1].trim();