From f3fe1f9c44b08de6d18cad27d8751585568b7e8e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 8 Jul 2016 16:14:55 +0200 Subject: Refactor: pass Main to id_make_local. Totally stupid to not pass it, and then let (some) BKE_foo_make_local() use G.main! Note: unused for now, much more refactoring still to come in make_local area! --- source/blender/editors/space_outliner/outliner_tools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_tools.c') diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 13adaff5224..f3235d07757 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -436,10 +436,10 @@ static void id_local_cb( TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data)) { if (ID_IS_LINKED_DATABLOCK(tselem->id) && (tselem->id->tag & LIB_TAG_EXTERN)) { + Main *bmain = CTX_data_main(C); /* if the ID type has no special local function, * just clear the lib */ - if (id_make_local(tselem->id, false) == false) { - Main *bmain = CTX_data_main(C); + if (id_make_local(bmain, tselem->id, false) == false) { id_clear_lib_data(bmain, tselem->id); } } -- cgit v1.2.3