[#21692] Blender Crashes upon trying to view UV Test Grid (r27639)
authorCampbell Barton <ideasman42@gmail.com>
Sun, 21 Mar 2010 10:25:21 +0000 (10:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 21 Mar 2010 10:25:21 +0000 (10:25 +0000)
fix for mistake in own commit when moving grid color func into its own file.

source/blender/blenkernel/intern/image_gen.c

index 86d07d70e649369a2b61accd7c00d8252bf75dd9..2c4851b1835615edfb7018fd7eed61e5b3556eff 100644 (file)
@@ -72,6 +72,10 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt
  
        int checkerwidth= 32, dark= 1;
        int x, y;
+    
+    unsigned char *rect_orig= rect;
+    float *rect_float_orig= rect_float;
+    
        
        float h=0.0, hoffs=0.0, hue=0.0, s=0.9, v=0.9, r, g, b;
 
@@ -104,7 +108,10 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt
                        }
                }
        }
-       
+
+    rect= rect_orig;
+    rect_float= rect_float_orig;
+
        /* 2nd pass, colored + */
        for(y= 0; y<height; y++) {
                hoffs= 0.125f * floorf(y / checkerwidth);