From: scislac Date: Sun, 8 Nov 2009 01:09:47 +0000 (+0000) Subject: Fix for crash 409043 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cc149fbbfc6340eac5a43b04d30212732b3966f2;p=inkscape.git Fix for crash 409043 --- diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp index 241279100..69bae53d9 100644 --- a/src/box3d-side.cpp +++ b/src/box3d-side.cpp @@ -225,6 +225,16 @@ box3d_side_set_shape (SPShape *shape) box3d_side_compute_corner_ids(side, corners); SPCurve *c = new SPCurve(); + + if (!box3d_get_corner_screen(box, corners[0]).isFinite() || + !box3d_get_corner_screen(box, corners[1]).isFinite() || + !box3d_get_corner_screen(box, corners[2]).isFinite() || + !box3d_get_corner_screen(box, corners[3]).isFinite() ) + { + g_warning ("Trying to draw a 3D box side with invalid coordinates.\n"); + return; + } + c->moveto(box3d_get_corner_screen(box, corners[0])); c->lineto(box3d_get_corner_screen(box, corners[1])); c->lineto(box3d_get_corner_screen(box, corners[2]));