[Bf-blender-cvs] [d1d21dac510] master: Fix assert in image crop

Campbell Barton noreply at git.blender.org
Wed Oct 2 23:40:45 CEST 2019


Commit: d1d21dac510a623daaa4344e13935089ebb2c38a
Author: Campbell Barton
Date:   Thu Oct 3 06:58:43 2019 +1000
Branches: master
https://developer.blender.org/rBd1d21dac510a623daaa4344e13935089ebb2c38a

Fix assert in image crop

===================================================================

M	source/blender/imbuf/intern/rectop.c

===================================================================

diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 3163a960892..7150e41841b 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -262,7 +262,7 @@ void IMB_rect_crop(ImBuf *ibuf, const rcti *crop)
       BLI_rcti_size_x(crop) + 1,
       BLI_rcti_size_y(crop) + 1,
   };
-  BLI_assert(size_dst[0] > 0 && size_dst[0] > 0);
+  BLI_assert(size_dst[0] > 0 && size_dst[1] > 0);
   BLI_assert(crop->xmin >= 0 && crop->ymin >= 0);
   BLI_assert(crop->xmax < ibuf->x && crop->ymax < ibuf->y);
 
@@ -304,7 +304,7 @@ static void rect_realloc_16bytes(void **buf_p, const uint size[2])
  */
 void IMB_rect_size_set(ImBuf *ibuf, const uint size[2])
 {
-  BLI_assert(size[0] > 0 && size[0] > 0);
+  BLI_assert(size[0] > 0 && size[1] > 0);
   if ((size[0] == ibuf->x) && (size[1] == ibuf->y)) {
     return;
   }



More information about the Bf-blender-cvs mailing list