Fix T47368: Crash re-linking object to scene

This commit is contained in:
Campbell Barton 2016-02-09 18:06:06 +11:00
parent ea3900c58f
commit 7e5cabb6b6
Notes: blender-bot 2023-07-10 10:12:37 +02:00
Referenced by issue #47368, Crash: Re-linking Object to Different Scene
1 changed files with 6 additions and 0 deletions

View File

@ -400,8 +400,11 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te,
ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
/* leave for ED_outliner_id_unref to handle */
#if 0
te->directdata = NULL;
tselem->id = NULL;
#endif
}
}
@ -828,8 +831,11 @@ static void object_delete_hierarchy_cb(
}
outline_delete_hierarchy(C, scene, base);
/* leave for ED_outliner_id_unref to handle */
#if 0
te->directdata = NULL;
tselem->id = NULL;
#endif
}
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);