svn merge ^/trunk/blender -r43864:43887
[blender-staging.git] / source / blender / editors / sculpt_paint / paint_image.c
index 1e989cce14af20f698cc4d3dc73da4b9af45a00e..681ab3a149294cbfd60a7454df71e1fbf6746839 100644 (file)
@@ -476,7 +476,6 @@ static void image_undo_restore(bContext *C, ListBase *lb)
                }
 
                ibuf= BKE_image_get_ibuf(ima, NULL);
                }
 
                ibuf= BKE_image_get_ibuf(ima, NULL);
-               use_float = ibuf->rect_float ? 1 : 0;
 
                if(ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) {
                        /* current ImBuf filename was changed, probably current frame
 
                if(ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) {
                        /* current ImBuf filename was changed, probably current frame
@@ -493,6 +492,8 @@ static void image_undo_restore(bContext *C, ListBase *lb)
                if (ima->gen_type != tile->gen_type || ima->source != tile->source)
                        continue;
 
                if (ima->gen_type != tile->gen_type || ima->source != tile->source)
                        continue;
 
+               use_float = ibuf->rect_float ? 1 : 0;
+
                if (use_float != tile->use_float)
                        continue;
 
                if (use_float != tile->use_float)
                        continue;