From 168f26fc80ed72f53a73d2997776358a1a4a3b80 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 4 Apr 2021 15:29:08 +0000 Subject: [PATCH] Fix crash on startup --- components/sceneutil/util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/util.cpp b/components/sceneutil/util.cpp index cc8a2f44b4..1fe3685726 100644 --- a/components/sceneutil/util.cpp +++ b/components/sceneutil/util.cpp @@ -266,7 +266,9 @@ bool attachAlphaToCoverageFriendlyFramebufferToCamera(osg::Camera* camera, osg:: { #if OSG_VERSION_LESS_THAN(3, 6, 6) // hack fix for https://github.com/openscenegraph/OpenSceneGraph/issues/1028 - osg::GLExtensions::Get(0, false)->glRenderbufferStorageMultisampleCoverageNV = nullptr; + osg::ref_ptr extensions = osg::GLExtensions::Get(0, false); + if (extensions) + extensions->glRenderbufferStorageMultisampleCoverageNV = nullptr; #endif unsigned int samples = 0; unsigned int colourSamples = 0;