From 9ef5d2d90598ce97b8ec773bb00f97825dbe0e1b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 23 Feb 2013 01:33:47 +0000 Subject: fix for error in the blenderplayer caused by r54727 (can't assume G.main is valid on load). --- source/blender/blenkernel/intern/depsgraph.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/depsgraph.c') diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 56600069aa0..8c55ad02dc6 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2914,12 +2914,10 @@ void DAG_ids_clear_recalc(Main *bmain) memset(bmain->id_tag_update, 0, sizeof(bmain->id_tag_update)); } -void DAG_id_tag_update(ID *id, short flag) +void DAG_id_tag_update_ex(Main *bmain, ID *id, short flag) { - Main *bmain = G.main; - if (id == NULL) return; - + /* tag ID for update */ if (flag) { if (flag & OB_RECALC_OB) @@ -2974,6 +2972,11 @@ void DAG_id_tag_update(ID *id, short flag) } } +void DAG_id_tag_update(ID *id, short flag) +{ + DAG_id_tag_update_ex(G.main, id, flag); +} + void DAG_id_type_tag(Main *bmain, short idtype) { if (idtype == ID_NT) { -- cgit v1.2.3