Code should initialize parameters not marked as required (or all) with something meaningful that can be tested against, e.g. -1.
Fix:
namespace tinygltf {
class Node {
public:
Node() = default;
DEFAULT_METHODS(Node)
bool operator==(const Node &) const;
int camera = -1; // the index of the camera referenced by this node
std::string name;
int skin = -1;
int mesh = -1;
int light = -1; // light source index (KHR_lights_punctual)
int emitter = -1; // audio emitter index (KHR_audio)
Describe the issue
No default initialization of
light
andemitter
intinygltf::Node
. This causes crash in json serializationTo Reproduce
Expected behaviour
Code should initialize parameters not marked as required (or all) with something meaningful that can be tested against, e.g.
-1
.Fix:
Screenshots
na
Additional context na