[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32211] trunk/blender/source/blender/ collada/DocumentExporter.cpp: Prevent crash if image for image texture is not set.
Nathan Letwory
nathan at letworyinteractive.com
Thu Sep 30 13:42:02 CEST 2010
Revision: 32211
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32211
Author: jesterking
Date: 2010-09-30 13:42:02 +0200 (Thu, 30 Sep 2010)
Log Message:
-----------
Prevent crash if image for image texture is not set.
Modified Paths:
--------------
trunk/blender/source/blender/collada/DocumentExporter.cpp
Modified: trunk/blender/source/blender/collada/DocumentExporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentExporter.cpp 2010-09-30 11:27:47 UTC (rev 32210)
+++ trunk/blender/source/blender/collada/DocumentExporter.cpp 2010-09-30 11:42:02 UTC (rev 32211)
@@ -1717,6 +1717,9 @@
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 @@
// 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));
}
}
More information about the Bf-blender-cvs
mailing list