]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
same bug, different place :P
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sat, 23 May 2009 18:30:13 +0000 (18:30 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sat, 23 May 2009 18:30:13 +0000 (18:30 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@375 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/light_trace.c

index ea3769a1b4d1fab59bcd0e261fc2425ca282e619..3bd41b883af3498a29e47aee54956e20a1a5f8f6 100644 (file)
@@ -401,7 +401,13 @@ static int SetupTraceNodes_r( int bspNodeNum )
                
                /* normal node */
                else
-                       traceNodes[ nodeNum ].children[ i ] = SetupTraceNodes_r( bspNode->children[ i ] );
+               {
+                       newNode = SetupTraceNodes_r( bspNode->children[ i ] );
+                       traceNodes[ nodeNum ].children[ i ] = newNode;
+               }
+
+               if(traceNodes[ nodeNum ].children[ i ] == 0)
+                       Error( "Invalid tracenode allocated" );
        }
 
        /* Sys_Printf("node %d children: %d %d\n", nodeNum, traceNodes[ nodeNum ].children[0], traceNodes[ nodeNum ].children[1]); */