]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
fux segv
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Fri, 22 May 2009 06:56:10 +0000 (06:56 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Fri, 22 May 2009 06:56:10 +0000 (06:56 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@371 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/lightmaps_ydnar.c

index eee4f6f8e19db45c077f59a4d20e24b685d07e2f..3c1eed65c84d05f0027f95e9da655dcefdda2707 100644 (file)
@@ -2016,7 +2016,7 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                        y = 0;
                        
                        /* walk the list of lightmap pages */
-                       if(lightmapSearchBlockSize <= 0)
+                       if(lightmapSearchBlockSize <= 0 || numOutLightmaps < LIGHTMAP_RESERVE_COUNT)
                                i = 0;
                        else
                                i = ((numOutLightmaps - LIGHTMAP_RESERVE_COUNT) / lightmapSearchBlockSize) * lightmapSearchBlockSize;