]> Dogcows Code - chaz/openbox/blobdiff - obrender/gradient.c
Merge branch 'master' into chaz
[chaz/openbox] / obrender / gradient.c
index 60a0a5556a7157ea08ea63fe2d00594609acb8e4..7f2f1f8fb7f5e4cc1765cbcfe4c0a90ddd898e85 100644 (file)
@@ -527,13 +527,15 @@ static void gradient_splitvertical(RrAppearance *a, gint w, gint h)
     /* find the color for the first pixel of each row first */
     data = sf->pixel_data;
 
-    for (y1 = y1sz-1; y1 > 0; --y1) {
+    if (y1sz) {
+        for (y1 = y1sz-1; y1 > 0; --y1) {
+            *data = COLOR(y1);
+            data += w;
+            NEXT(y1);
+        }
         *data = COLOR(y1);
         data += w;
-        NEXT(y1);
     }
-    *data = COLOR(y1);
-    data += w;
     if (y2sz) {
         for (y2 = y2sz-1; y2 > 0; --y2) {
             *data = COLOR(y2);
This page took 0.01651 seconds and 4 git commands to generate.