fix bug in ini file

This commit is contained in:
Grahame Grieve 2022-02-12 09:53:33 +11:00
parent 38a1770bb6
commit ea3ae8d82c
1 changed files with 5 additions and 3 deletions

View File

@ -1512,9 +1512,11 @@ public final class IniFile
}
public boolean hasSection(String sectionName) {
for (String s : getAllSectionNames()) {
if (s.equalsIgnoreCase(sectionName)) {
return true;
if (getAllSectionNames() != null) {
for (String s : getAllSectionNames()) {
if (s.equalsIgnoreCase(sectionName)) {
return true;
}
}
}
return false;