Merged changes in the trunk up to revision 52340.
[blender.git] / source / blender / blenkernel / intern / library.c
index 5b54154..db96567 100644 (file)
@@ -1535,7 +1535,9 @@ void test_idbutton(char *name)
        /* search for id */
        idtest = BLI_findstring(lb, name, offsetof(ID, name) + 2);
 
-       if (idtest) if (new_id(lb, idtest, name) == 0) id_sort_by_name(lb, idtest);
+       if (idtest && (new_id(lb, idtest, name) == 0)) {
+               id_sort_by_name(lb, idtest);
+       }
 }
 
 void text_idbutton(struct ID *id, char *text)