Commit 0c6f61ab12963c2a594e1b264388820599050f0e

Alexei Podtelezhnikov 2019-05-07T19:07:11

* src/raster/ftraster.c (Draw_Sweep): Unbreak.

diff --git a/ChangeLog b/ChangeLog
index bf67866..d68323a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-05-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	* src/raster/ftraster.c (Draw_Sweep): Unbreak.
+
 2019-05-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
 	* src/raster/ftraster.c: Clean-ups.
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 123c15f..023b6c1 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2776,12 +2776,6 @@
       Sort( &draw_left );
       Sort( &draw_right );
 
-      if ( !draw_right )
-      {
-        ras.error = FT_THROW( Invalid );
-        return FAILURE;
-      }
-
       y_change = (Short)ras.sizeBuff[-ras.numTurns--];
       y_height = (Short)( y_change - y );
 
@@ -2794,7 +2788,7 @@
         P_Left  = draw_left;
         P_Right = draw_right;
 
-        while ( P_Left )
+        while ( P_Left && P_Right )
         {
           x1 = P_Left ->X;
           x2 = P_Right->X;
@@ -2895,7 +2889,7 @@
     P_Left  = draw_left;
     P_Right = draw_right;
 
-    while ( P_Left )
+    while ( P_Left && P_Right )
     {
       if ( P_Left->countL )
       {