From 721fa28c1e1bdeb01961776519feed4ac93d1c47 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Sat, 16 Jul 2016 18:59:18 +0200 Subject: [PATCH] Fix assertion failure with NiTextureEffect missing source texture --- components/nifosg/nifloader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index b71701f55..3e67fbb3c 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -481,6 +481,12 @@ namespace NifOsg return; } + if (textureEffect->texture.empty()) + { + std::cerr << "NiTextureEffect missing source texture in " << mFilename << std::endl; + return; + } + osg::ref_ptr texGen (new osg::TexGen); switch (textureEffect->coordGenType) {