From bc49957d2351f02bcd387cbbe483b999439cffce Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 1 Oct 2004 22:17:33 +0000 Subject: [PATCH] those conditions are slightly better than before. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@281 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_model.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/gl/gl_model.c b/engine/gl/gl_model.c index b02e81c7d..298fc58ed 100644 --- a/engine/gl/gl_model.c +++ b/engine/gl/gl_model.c @@ -421,9 +421,12 @@ void GLMod_Think (void) char filename[MAX_QPATH]; Con_Printf("Finished lighting level\n"); - COM_StripExtension(lightmodel->name, filename); - COM_DefaultExtension(filename, ".lux"); - COM_WriteFile(filename, lightmodel->deluxdata-8, numlightdata*3+8); + if (lightmodel->deluxdata) + { + COM_StripExtension(lightmodel->name, filename); + COM_DefaultExtension(filename, ".lux"); + COM_WriteFile(filename, lightmodel->deluxdata-8, numlightdata*3+8); + } if (writelitfile) //the user might already have a lit file (don't overwrite it). {