[Bf-blender-cvs] [8b17ec0c000] master: Fix T52136: Blender segfault (stack overflow most certainly) when converting to mesh.

Bastien Montagne noreply at git.blender.org
Fri Jul 21 10:24:55 CEST 2017


Commit: 8b17ec0c0004cd9e39d9f6b3bcf31d0a8d120638
Author: Bastien Montagne
Date:   Fri Jul 21 10:24:20 2017 +0200
Branches: master
https://developer.blender.org/rB8b17ec0c0004cd9e39d9f6b3bcf31d0a8d120638

Fix T52136: Blender segfault (stack overflow most certainly) when converting to mesh.

Stupid mistake in own recent refactor.

===================================================================

M	source/blender/editors/object/object_add.c

===================================================================

diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b5a9c4e9e5b..4ed1e85fb48 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1682,7 +1682,7 @@ static int convert_exec(bContext *C, wmOperator *op)
 			 * However, changing this is more design than bugfix, not to mention convoluted code below,
 			 * so that will be for later.
 			 * But at the very least, do not do that with linked IDs! */
-			if ((ID_IS_LINKED_DATABLOCK(ob) || ID_IS_LINKED_DATABLOCK(ob->data)) && !keep_original) {
+			if ((ID_IS_LINKED_DATABLOCK(ob) || (ob->data && ID_IS_LINKED_DATABLOCK(ob->data))) && !keep_original) {
 				keep_original = true;
 				BKE_reportf(op->reports, RPT_INFO,
 				            "Converting some linked object/object data, enforcing 'Keep Original' option to True");




More information about the Bf-blender-cvs mailing list