mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 12:05:50 +00:00
Make initialization options parsing less crashy if null is passed instead of undefined/nothing.
See issue #247.
This commit is contained in:
parent
a4496b7430
commit
a0a52e50a2
@ -40,6 +40,9 @@ class JsonReader : public Reader {
|
||||
}
|
||||
|
||||
void DoMember(const char* name, std::function<void(Reader&)> fn) override {
|
||||
if (m_->GetType() != rapidjson::Type::kObjectType)
|
||||
return; // FIXME: signal an error that object was not deserialized correctly?
|
||||
|
||||
auto it = m_->FindMember(name);
|
||||
if (it != m_->MemberEnd()) {
|
||||
JsonReader sub(&it->value);
|
||||
|
Loading…
Reference in New Issue
Block a user