RNA:
[blender.git] / source / blender / editors / space_outliner / space_outliner.c
index 923710d22b352472fe1c72f3ec7b8341fa8c0947..84beb52e9534b42a635bee7ed2123d94639770d8 100644 (file)
@@ -230,7 +230,8 @@ static void rna_collection_but(CellRNA *cell, rcti *rct, uiBlock *block)
 
                if(nameprop)
                        nameptr= RNA_property_string_get_alloc(&lookup, nameprop, name, sizeof(name));
-               else
+
+               if(!nameprop || strlen(nameptr) == 0)
                        sprintf(nameptr, "%d", cell->index+1);
        }