mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-15 03:35:58 +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")) {
|
if (light_ext.Has("light")) {
|
||||||
light = light_ext.Get("light").GetNumberAsInt();
|
light = light_ext.Get("light").GetNumberAsInt();
|
||||||
} else {
|
} else {
|
||||||
*err += "Node has extension KHR_lights_punctual, but does not reference "
|
if (err) {
|
||||||
"a light source.\n";
|
*err += "Node has extension KHR_lights_punctual, but does not reference "
|
||||||
|
"a light source.\n";
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user