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:
authorGaia Clary <gaia.clary@machinimatrix.org>2018-03-11 22:32:47 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2018-03-11 22:59:50 +0300
commit2c9c22df26dfdcf03bb308fdf35294ed79c2d0e5 (patch)
treebafd0995f9329e90c4afd96787f450348592c8cd /source/blender/collada/ImageExporter.cpp
parent49a7cd1ba4e43607aa42a26222beef353c528bac (diff)
fix Collada: wrong usage of pointer and hidden redeclaration
* Suspicious usage of pointer: short *type = 0; // this creates a null pointer When this is later used for anything then blender would crash. After following the code and check what happens i strongly believe the author wanted to use a short and not a pointer to a short here. * local variable where reused later in same function While this did no harm, i still felt it was better to use a different name here to make things more separated: - moved variable declaraiotns into loop (for int a=0; ...) - renamed uv_images to uv_image_set - renamed index variable from i to j in inner loop that reused same index name from outer loop
Diffstat (limited to 'source/blender/collada/ImageExporter.cpp')
-rw-r--r--source/blender/collada/ImageExporter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index 93be7de6236..99547551a12 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -203,8 +203,8 @@ bool ImagesExporter::hasImages(Scene *sce)
for (node = this->export_settings->export_set; node; node = node->next) {
Object *ob = (Object *)node->link;
- int a;
- for (a = 0; a < ob->totcol; a++) {
+
+ for (int a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a + 1);
// no material, but check all of the slots