Fix for various small issues which may cause crashes

This commit is contained in:
Joshua Leung 2015-03-13 22:03:26 +13:00
parent da0d0b2f20
commit 6dac874d68
2 changed files with 3 additions and 3 deletions

View File

@ -386,7 +386,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro
}
/* if we still haven't found anything, check whether it's a "special" property */
if ((fcu == NULL) && (adt->nla_tracks.first)) {
if ((fcu == NULL) && (adt && adt->nla_tracks.first)) {
NlaTrack *nlt;
const char *propname = RNA_property_identifier(prop);

View File

@ -198,11 +198,11 @@ static void restrictbutton_recursive_child(bContext *C, Scene *scene, Object *ob
ID *id;
bAction *action;
FCurve *fcu;
bool driven;
bool driven, special;
RNA_id_pointer_create(&ob->id, &ptr);
prop = RNA_struct_find_property(&ptr, rnapropname);
fcu = rna_get_fcurve_context_ui(C, &ptr, prop, 0, NULL, &action, &driven, NULL);
fcu = rna_get_fcurve_context_ui(C, &ptr, prop, 0, NULL, &action, &driven, &special);
if (fcu && !driven) {
id = ptr.id.data;