Fix T40829: Collada Export with 'Include Material Textures' selected crashes.

Code would not check a texture did have a valid image pointer...
This commit is contained in:
Bastien Montagne 2014-06-28 21:51:04 +02:00
parent 683743b360
commit b5acd1aa87
Notes: blender-bot 2023-02-14 10:25:56 +01:00
Referenced by issue #40829, Collada Export with 'Include Material Textures' selected crashes
1 changed files with 4 additions and 0 deletions

View File

@ -372,6 +372,10 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
MTex *t = ma->mtex[tex_indices[a]];
Image *ima = t->tex->ima;
if (!ima) {
continue;
}
std::string key(id_name(ima));
key = translate_id(key);
int i = im_samp_map[key];