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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-14 16:27:25 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-14 16:27:49 +0300
commitcab013bc5d4da1c552a3afc4ea980645e9540f46 (patch)
tree6554c9872811320cfeb7918251523f0d7ac9d4ae /source
parent6eb5b418eee8cb26ac0e3a8bb70cbaf706be4e4d (diff)
Fix use of uninitialized variable in some cases, in recent bugfix.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/object/object_add.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 8fc2d419c3c..efc69c36cc3 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1621,7 +1621,7 @@ static int convert_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
Base *basen = NULL, *basact = NULL;
- Object *ob, *ob1, *newob, *obact = CTX_data_active_object(C);
+ Object *ob, *ob1, *obact = CTX_data_active_object(C);
DerivedMesh *dm;
Curve *cu;
Nurb *nu;
@@ -1689,6 +1689,7 @@ static int convert_exec(bContext *C, wmOperator *op)
}
for (CollectionPointerLink *link = selected_editable_bases.first; link; link = link->next) {
+ Object *newob = NULL;
Base *base = link->ptr.data;
ob = base->object;
@@ -1904,7 +1905,9 @@ static int convert_exec(bContext *C, wmOperator *op)
}
/* Ensure new object has consistent material data with its new obdata. */
- test_object_materials(bmain, newob, newob->data);
+ if (newob) {
+ test_object_materials(bmain, newob, newob->data);
+ }
/* tag obdata if it was been changed */