]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/lightmaps_ydnar.c
Q3map2:
[xonotic/netradiant.git] / tools / quake3 / q3map2 / lightmaps_ydnar.c
index 28ccab57921e064e1e7d1eb590d47647841fc190..82de24747d5615f07ae52ff6d62e13789a5fce0b 100644 (file)
@@ -2166,6 +2166,10 @@ static void FindOutLightmaps( rawLightmap_t *lm ){
                        /* allocate LIGHTMAP_RESERVE_COUNT new output lightmaps */
                        numOutLightmaps += LIGHTMAP_RESERVE_COUNT;
                        olm = safe_malloc( numOutLightmaps * sizeof( outLightmap_t ) );
+                       if ( !olm ){
+                               Error( "FindOutLightmaps: Failed to allocate memory.\n" );
+                       }
+
                        if ( outLightmaps != NULL && numOutLightmaps > LIGHTMAP_RESERVE_COUNT ) {
                                memcpy( olm, outLightmaps, ( numOutLightmaps - LIGHTMAP_RESERVE_COUNT ) * sizeof( outLightmap_t ) );
                                free( outLightmaps );