Prevent crash from using colormap without entries

Can happen if all colormap variables were set, but the file didn't exist or couldn't be loaded
This commit is contained in:
Emma Broman
2022-05-02 09:51:26 +02:00
parent cf582054dc
commit 06ea668225

View File

@@ -1053,7 +1053,7 @@ std::vector<float> RenderableBillboardsCloud::createDataSlice() {
const double r = glm::length(p);
maxRadius = std::max(maxRadius, r);
if (_hasColorMapFile) {
if (_hasColorMapFile && _useColorMap && !_colorMap.entries.empty()) {
for (int j = 0; j < 4; ++j) {
result.push_back(position[j]);
}