Fix for potential null-pointer-dereference if the new action is NULL

This commit is contained in:
Joshua Leung
2015-04-20 12:30:29 +12:00
parent e4fbc8fc8d
commit 689241b6e5

View File

@@ -1237,7 +1237,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
/* Assign new action, and adjust the usercounts accordingly */
adt->action = saction->action;
id_us_plus(&adt->action->id);
id_us_plus((ID *)adt->action);
}
else {
/* fix id-count of action we're replacing */
@@ -1247,7 +1247,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
/* Assign new action, and adjust the usercounts accordingly */
adt->action = saction->action;
id_us_plus(&adt->action->id);
id_us_plus((ID *)adt->action);
}
}