summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a3df97)
raw | patch | inline | side by side (parent: 3a3df97)
author | scislac <scislac@users.sourceforge.net> | |
Sun, 8 Nov 2009 01:09:47 +0000 (01:09 +0000) | ||
committer | scislac <scislac@users.sourceforge.net> | |
Sun, 8 Nov 2009 01:09:47 +0000 (01:09 +0000) |
src/box3d-side.cpp | patch | blob | history |
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index 241279100a8bee0e7b6bfc8033d5275cd3c1b904..69bae53d93b696fb1f362d85b7ac2bee9650a1f3 100644 (file)
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
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]));