diff --git a/cpp/INIReader.cpp b/cpp/INIReader.cpp index 45ef9fe..b29d896 100644 --- a/cpp/INIReader.cpp +++ b/cpp/INIReader.cpp @@ -105,6 +105,8 @@ string INIReader::MakeKey(const string& section, const string& name) int INIReader::ValueHandler(void* user, const char* section, const char* name, const char* value) { + if (!name) // Happens when INI_CALL_HANDLER_ON_NEW_SECTION enabled + return 1; INIReader* reader = static_cast(user); string key = MakeKey(section, name); if (reader->_values[key].size() > 0)