fix [#26507] Rename bone -> segfault
authorCampbell Barton <ideasman42@gmail.com>
Tue, 15 Mar 2011 03:38:15 +0000 (03:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 15 Mar 2011 03:38:15 +0000 (03:38 +0000)
source/blender/blenkernel/intern/anim_sys.c

index c7aa3355f60d3200d5dc5fa052bf9e023981b53d..16269c3f66f79389ebca74bf73bb49c0d5fd9e17 100644 (file)
@@ -562,7 +562,7 @@ static void drivers_path_rename_fix (ID *owner_id, const char *prefix, char *old
                                DRIVER_TARGETS_USED_LOOPER(dvar) 
                                {
                                        /* rename RNA path */
-                                       if (dtar->rna_path)
+                                       if (dtar->rna_path && dtar->id)
                                                dtar->rna_path= rna_path_rename_fix(dtar->id, prefix, oldKey, newKey, dtar->rna_path, verify_paths);
                                        
                                        /* also fix the bone-name (if applicable) */