fix for crash on missing NULL check,
authorCampbell Barton <ideasman42@gmail.com>
Tue, 7 Dec 2010 00:48:36 +0000 (00:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 7 Dec 2010 00:48:36 +0000 (00:48 +0000)
Brecht, changed this to update the duplicate objects data rather then the old ones incase they are not linked.

source/blender/editors/object/object_add.c

index 58985a97a7250b7ab0f6be50a8b8dacc89fc48b1..5a4bbaf480ce1b1b94e78343317b1c66a8207130 100644 (file)
@@ -1658,8 +1658,10 @@ static int duplicate_exec(bContext *C, wmOperator *op)
                /* new object becomes active */
                if(BASACT==base)
                        ED_base_object_activate(C, basen);
-               
-               DAG_id_tag_update(base->object->data, 0);
+
+               if(basen->object->data) {
+                       DAG_id_tag_update(basen->object->data, 0);
+               }
        }
        CTX_DATA_END;