VOXELFORMAT: ensure to only return a value volume if the node type matches

master
Martin Gerhardy 2022-04-23 22:18:05 +02:00
parent 65fd0a688c
commit 6b3d67fc81
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}