Skip to content

Commit

Permalink
[qt/cpp-core:main] Fix Parser::parseLayers id access segfault (#2219)
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinEvansWX authored Mar 30, 2024
1 parent 7599611 commit adf029c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/style/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void Parser::parseLayers(const JSValue& value) {
continue;
}

const JSValue& id = layerValue["id"];
const JSValue& id = layerValue.FindMember("id")->value;
if (!id.IsString()) {
Log::Warning(Event::ParseStyle, "layer id must be a string");
continue;
Expand Down

0 comments on commit adf029c

Please sign in to comment.