mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-04-23 22:50:11 +08:00
fix: add missing nullptr check
This commit is contained in:
parent
c164878d0f
commit
157063fa1b
@ -5098,8 +5098,10 @@ static bool ParseNode(Node *node, std::string *err, const detail::json &o,
|
||||
if (light_ext.Has("light")) {
|
||||
light = light_ext.Get("light").GetNumberAsInt();
|
||||
} else {
|
||||
*err += "Node has extension KHR_lights_punctual, but does not reference "
|
||||
"a light source.\n";
|
||||
if (err) {
|
||||
*err += "Node has extension KHR_lights_punctual, but does not reference "
|
||||
"a light source.\n";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user