From 40dc1dd6f5c2acf0f5e4af8356c861b70a16ae31 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 10 Jul 2017 23:50:24 +0200 Subject: [PATCH] Fix checking a variable before it's assigned (Bug #3950) --- components/nifosg/nifloader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 05f6263b7..e514cca12 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -623,11 +623,6 @@ namespace NifOsg node->setNodeMask(0x1); } - if (skipMeshes && isAnimated) // make sure the empty node is not optimized away so the physicssystem can find it. - { - node->setDataVariance(osg::Object::DYNAMIC); - } - // We can skip creating meshes for hidden nodes if they don't have a VisController that // might make them visible later if (nifNode->flags & Nif::NiNode::Flag_Hidden) @@ -643,6 +638,11 @@ namespace NifOsg node->setNodeMask(0x1); } + if (skipMeshes && isAnimated) // make sure the empty node is not optimized away so the physicssystem can find it. + { + node->setDataVariance(osg::Object::DYNAMIC); + } + osg::ref_ptr composite = new SceneUtil::CompositeStateSetUpdater; applyNodeProperties(nifNode, node, composite, imageManager, boundTextures, animflags);