mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 08:49:20 -05:00
Fix crash from dereferencing a null ptr
This commit is contained in:
@@ -275,7 +275,7 @@ float AtmosphereDeferredcaster::eclipseShadow(glm::dvec3 position, bool ground)
|
||||
// This code is copied from the atmosphere deferred fragment shader
|
||||
// It is used to calculate the eclipse shadow
|
||||
const ShadowRenderingStruct& shadow = _shadowDataArrayCache.front();
|
||||
if (!shadow.isShadowing) {
|
||||
if (_shadowDataArrayCache.empty() || !shadow.isShadowing) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user