From 06ea668225904cd8f10abfc361a6de1236de87c2 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 2 May 2022 09:51:26 +0200 Subject: [PATCH] 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 --- modules/digitaluniverse/rendering/renderablebillboardscloud.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index 0c842c1a8f..75debb26a2 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -1053,7 +1053,7 @@ std::vector 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]); }