diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-30 15:42:02 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-30 15:42:02 +0400 |
commit | 0d1a9c77840e0c6442e23b6c32564a5a52b2d5f7 (patch) | |
tree | b6ecf5f081abfff5e37f52122353ad5438c217b9 /source/blender/collada | |
parent | 8a5c516864da4081222c190381c2e54b6073c69c (diff) |
Prevent crash if image for image texture is not set.
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index deddd8f8cba..1bfa4f7e57c 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -1717,6 +1717,9 @@ public: MTex *t = ma->mtex[tex_indices[a]]; Image *ima = t->tex->ima; + // Image not set for texture + if(!ima) continue; + std::string key(id_name(ima)); key = translate_id(key); @@ -1804,7 +1807,7 @@ public: // technique FCOLLADA, with the <bump> tag, is most likely the best understood, // most widespread de-facto standard. texture.setProfileName("FCOLLADA"); - texture.setChildElementName("bump"); + texture.setChildElementName("bump"); ep.addExtraTechniqueColorOrTexture(COLLADASW::ColorOrTexture(texture)); } } |