fix for possible use of uninitialized variable in pastebuf_match_path_property()
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 09:38:34 +0000 (09:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 09:38:34 +0000 (09:38 +0000)
wasn't checking if RNA_path_resolve() succeeded.

source/blender/editors/animation/keyframes_general.c

index 2cb2f6683efacfe3e106213999a854de44847c76..915cf409dcfa3e4ca274d2208655b5b107deedee 100644 (file)
@@ -628,9 +628,8 @@ static tAnimCopybufItem *pastebuf_match_path_property(FCurve *fcu, const short f
                                PropertyRNA *prop;
                                
                                RNA_id_pointer_create(aci->id, &id_ptr);
-                               RNA_path_resolve(&id_ptr, aci->rna_path, &rptr, &prop);
-                               
-                               if (prop) {
+
+                               if (RNA_path_resolve(&id_ptr, aci->rna_path, &rptr, &prop) && prop) {
                                        const char *identifier = RNA_property_identifier(prop);
                                        int len_id = strlen(identifier);
                                        int len_path = strlen(fcu->rna_path);