Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2010-09-30 15:42:02 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-09-30 15:42:02 +0400
commit0d1a9c77840e0c6442e23b6c32564a5a52b2d5f7 (patch)
treeb6ecf5f081abfff5e37f52122353ad5438c217b9 /source/blender/collada/DocumentExporter.cpp
parent8a5c516864da4081222c190381c2e54b6073c69c (diff)
Prevent crash if image for image texture is not set.
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r--source/blender/collada/DocumentExporter.cpp5
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));
}
}