summaryrefslogtreecommitdiff
path: root/plot/vrml.c
diff options
context:
space:
mode:
Diffstat (limited to 'plot/vrml.c')
-rw-r--r--plot/vrml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plot/vrml.c b/plot/vrml.c
index 0121c53..d56e62d 100644
--- a/plot/vrml.c
+++ b/plot/vrml.c
@@ -600,7 +600,9 @@ double cc[3] /* Surface color, cc == NULL or cc[0] < 0.0 */
if (set < 0 || set > 9)
error("vrml make_line_tri_quad set %d out of range",set);
- if (s->set[set].npoints > 0 && s->set[set].tqary[0].ix[2] < 0) /* First is a line */
+ if (s->set[set].npoints > 0
+ && s->set[set].ntrqu > 0
+ && s->set[set].tqary[0].ix[2] < 0) /* First is a line */
lines = 1; /* Assume all are lines */
if (cc != NULL && cc[0] >= 0.0) {
@@ -1745,7 +1747,6 @@ static int do_flush(vrml *s) {
fflush(s->fp);
rv = fclose(s->fp);
-
/* Check that there are the x3dom files with the output file */
if (s->fmt == fmt_x3dom) {
char *xl, *x3name;