Fixed issue with missed cache update when disabling movie clip channels
[blender.git] / source / blender / imbuf / intern / colormanagement.c
index f2e4a826a477c706db94f0423bd609fc7878c1e9..9e17347bce7f9c1097d92eb78ee44d1d2c0938e5 100644 (file)
@@ -893,7 +893,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
                 * it's safe to suppose standard byte buffer is used for display
                 */
 
-               if (!ibuf->rect)
+               if (ibuf->rect_float && (ibuf->rect == NULL || (ibuf->userflags & IB_RECT_INVALID)))
                        IMB_rect_from_float(ibuf);
 
                return (unsigned char *) ibuf->rect;
@@ -942,9 +942,8 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
        (void) view_transform;
        (void) display_settings;
 
-       if (!ibuf->rect) {
+       if (ibuf->rect_float && (ibuf->rect == NULL || (ibuf->userflags & IB_RECT_INVALID)))
                IMB_rect_from_float(ibuf);
-       }
 
        return (unsigned char*) ibuf->rect;
 #endif