check_for_dupid() was checking wrong variables for on name changes; could
authorKen Hughes <khughes@pacific.edu>
Sun, 6 May 2007 21:42:43 +0000 (21:42 +0000)
committerKen Hughes <khughes@pacific.edu>
Sun, 6 May 2007 21:42:43 +0000 (21:42 +0000)
allow IDs will null names ("") to be entered into listbases multiple times.

source/blender/blenkernel/intern/library.c

index 08e2fda533ba6b2811192e90b5dda7cf7ce152bd..23cf864e18192eb207132ff31dd6702ad8edeb48 100644 (file)
@@ -863,8 +863,7 @@ int check_for_dupid(ListBase *lb, ID *id, char *name)
                                splitIDname(idtest->name+2, leftest, &nrtest);
                                /* if base names match... */
                                /* optimized */
-                               if( idtest->name[2] == name[0] &&
-                                               strcmp(left, leftest)==0 ) {
+                               if( *left == *leftest && strcmp(left, leftest)==0 ) {
                                        if(nrtest < maxtest)
                                                in_use[nrtest]= 1;      /* mark as used */
                                        if(nr <= nrtest)