Fix T79187: Outliner "Make Single User" crash
When "ID Data" -> "Make Single User" is chosen with selected elements that are not curves, there is a crash. This fix ensures that the id in the callback function is an Action.
This commit is contained in:
@@ -867,11 +867,17 @@ static void id_select_linked_cb(bContext *C,
|
||||
static void singleuser_action_cb(bContext *C,
|
||||
ReportList *UNUSED(reports),
|
||||
Scene *UNUSED(scene),
|
||||
TreeElement *UNUSED(te),
|
||||
TreeElement *te,
|
||||
TreeStoreElem *tsep,
|
||||
TreeStoreElem *tselem,
|
||||
void *UNUSED(user_data))
|
||||
{
|
||||
/* This callback runs for all selected elements, some of which may not be actions which results
|
||||
* in a crash. */
|
||||
if (te->idcode != ID_AC) {
|
||||
return;
|
||||
}
|
||||
|
||||
ID *id = tselem->id;
|
||||
|
||||
if (id) {
|
||||
|
||||
Reference in New Issue
Block a user