From 2b49d0533817df05e829b3adc802a30b2234e49d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 7 Dec 2011 09:13:15 +0000 Subject: fix for NULL pointer free and add in some checks, while looking into bug [#29521], add asserts so we know if an invalid active index is ever set. --- source/blender/editors/space_outliner/outliner_select.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index aa50b3d5154..89547edaafa 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -397,6 +397,8 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement * ob= (Object *)tselem->id; if(set) { ob->actdef= te->index+1; + BLI_assert(ob->actdef >= 0); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); } -- cgit v1.2.3