diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-30 04:32:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-30 04:32:13 +0400 |
commit | 9b2df014d2ab714c4ff0ec9848f25a7db7f54142 (patch) | |
tree | a571e2a262f8d5ccbeb8b94fcc3d320c9dadb378 /source/blender/editors/space_outliner/outliner_tools.c | |
parent | aff705c4305cf972992fd4750dccc8b7b4a343b8 (diff) |
fix [#29459] Crash making a linked object group local
was an error with make-local refactor & path updating.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index f4e46d0255d..09a125692d2 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -307,10 +307,15 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto } } -static void id_local_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void id_local_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { if (tselem->id->lib && (tselem->id->flag & LIB_EXTERN)) { - id_clear_lib_data(NULL, tselem->id); + /* 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); + id_clear_lib_data(bmain, tselem->id); + } } } |