From 53a744fc8ca4a5163264f6a1b09b18444b793fbd Mon Sep 17 00:00:00 2001 From: iobyte Date: Sun, 16 Jul 2023 18:03:57 +0000 Subject: [PATCH] trackgen: fix crash from missing texture git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9107 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: b6bed816bc24613620c8df88870d043c91054130 Former-commit-id: 1f9ad9917269965fe9a43b6e38563320100da4e8 --- src/tools/accc/ac3dload.cpp | 2 ++ src/tools/accc/mainaccc.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/accc/ac3dload.cpp b/src/tools/accc/ac3dload.cpp index edd2a3abe..dd3c34b41 100644 --- a/src/tools/accc/ac3dload.cpp +++ b/src/tools/accc/ac3dload.cpp @@ -2442,6 +2442,8 @@ void stripifyOb(FILE * ofile, ob_t * object, bool writeit) if (object->numsurf < 3 && !writeit) return; + if (object->vertexarray.size() < 3) + return; fprintf(stderr, "stripifying %s \r", object->name.c_str()); sprintf(filename, "temp.obj"); stripeout = fopen(filename, "w"); diff --git a/src/tools/accc/mainaccc.cpp b/src/tools/accc/mainaccc.cpp index e7c93719a..aa72dc176 100644 --- a/src/tools/accc/mainaccc.cpp +++ b/src/tools/accc/mainaccc.cpp @@ -58,7 +58,7 @@ double smooth_angle = 70.0; void usage(void) { - fprintf(stderr, "Ac3d Compiler $Revision: 1.4.4 $\n"); + fprintf(stderr, "Ac3d Compiler $Revision: 1.4.5 $\n"); fprintf(stderr, "Usage: accc [option] [dist][-order \"orderstring\"]<\n"); fprintf(stderr, "+o: ac3d to ac3d : the result file is optimized\n"); fprintf(stderr, " in using groups by zone of track\n");