diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-29 05:05:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-29 05:05:26 +0400 |
commit | 00afa5900486dd95a43d1415014c43d3544be720 (patch) | |
tree | 5e4ce837eb30cbe541d506ecf9da3f8efed6708d | |
parent | 0668ad2d55935b5f7ecc6f8f4c9b38e27db7ec65 (diff) |
fix for crash adding empty object
-rw-r--r-- | source/blender/editors/object/object_add.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index bcd8b8903e7..f1bc63aa746 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -326,7 +326,9 @@ Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot, int en DAG_id_type_tag(bmain, ID_OB); DAG_scene_sort(bmain, scene); - ED_render_id_flush_update(bmain, ob->data); + if (ob->data) { + ED_render_id_flush_update(bmain, ob->data); + } if(enter_editmode) ED_object_enter_editmode(C, EM_IGNORE_LAYER); @@ -1809,7 +1811,9 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag set_sca_new_poins_ob(ob); DAG_scene_sort(bmain, scene); - ED_render_id_flush_update(bmain, ob->data); + if (ob->data) { + ED_render_id_flush_update(bmain, ob->data); + } return basen; } |