[Spice-devel] [spice-common PATCH 1/2] common: prepare for not aborting on spice_critical

Uri Lublin uril at redhat.com
Thu Dec 13 09:54:12 PST 2012


diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index deb7649..05edf68 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -354,6 +354,7 @@ static void set_path(GdiCanvas *canvas, SpicePath *s)
                 if (!LineTo(canvas->dc, (int)fix_to_double(point->x),
                             (int)fix_to_double(point->y))) {
                     spice_critical("LineTo failed");
+                    return;
                 }
             }
         }
@@ -363,11 +364,13 @@ static void set_path(GdiCanvas *canvas, SpicePath *s)
             if (seg->flags & SPICE_PATH_CLOSE) {
                 if (!CloseFigure(canvas->dc)) {
                     spice_critical("CloseFigure failed");
+                    return;
                 }
             }
 
             if (!EndPath(canvas->dc)) {
                 spice_critical("EndPath failed");
+                return;
             }
         }
 
-- 
1.7.1



More information about the Spice-devel mailing list