From cc2ce9fa3e49b86fe1501eb2fe3b26e80918c995 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 19 Dec 2020 21:57:42 +0000 Subject: [PATCH] Explicitly default-construct array The docs seem to imply this is automatic when the array contains a class-type, which osg::ref_ptr is, but I got a crash log that doesn't make sense if that's true. --- components/sceneutil/mwshadowtechnique.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index 31267f75c..39e47b0ea 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -782,13 +782,15 @@ void MWShadowTechnique::ViewDependentData::releaseGLObjects(osg::State* state) c MWShadowTechnique::MWShadowTechnique(): ShadowTechnique(), _enableShadows(false), - _debugHud(nullptr) + _debugHud(nullptr), + _castingPrograms{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr } { _shadowRecievingPlaceholderStateSet = new osg::StateSet; } MWShadowTechnique::MWShadowTechnique(const MWShadowTechnique& vdsm, const osg::CopyOp& copyop): ShadowTechnique(vdsm,copyop) + , _castingPrograms(vdsm._castingPrograms) { _shadowRecievingPlaceholderStateSet = new osg::StateSet; _enableShadows = vdsm._enableShadows;