code cleanup: icon creation
[blender-staging.git] / source / blender / blenloader / intern / readfile.c
index 5543e8420078c569c1044b85cf3099127418205f..d6d9a4c88c99780b1d44cd8df46df53c6ad12914 100644 (file)
@@ -1583,7 +1583,7 @@ static PreviewImage *direct_link_preview_image(FileData *fd, PreviewImage *old_p
 
        if (prv) {
                int i;
-               for (i=0; i < PREVIEW_MIPMAPS; ++i) {
+               for (i=0; i < NUM_ICON_SIZES; ++i) {
                        if (prv->rect[i]) {
                                prv->rect[i] = newdataadr(fd, prv->rect[i]);
                        }