VOXELFORMAT: ensure to only return a value volume if the node type matches
parent
65fd0a688c
commit
6b3d67fc81
|
@ -279,10 +279,16 @@ inline int SceneGraphNode::id() const {
|
|||
}
|
||||
|
||||
inline voxel::RawVolume *SceneGraphNode::volume() const {
|
||||
if (_type != SceneGraphNodeType::Model) {
|
||||
return nullptr;
|
||||
}
|
||||
return _volume;
|
||||
}
|
||||
|
||||
inline voxel::RawVolume *SceneGraphNode::volume() {
|
||||
if (_type != SceneGraphNodeType::Model) {
|
||||
return nullptr;
|
||||
}
|
||||
return _volume;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue