From 8b17ec0c0004cd9e39d9f6b3bcf31d0a8d120638 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 21 Jul 2017 10:24:20 +0200 Subject: Fix T52136: Blender segfault (stack overflow most certainly) when converting to mesh. Stupid mistake in own recent refactor. --- source/blender/editors/object/object_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/object') 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"); -- cgit v1.2.3