Skip to content

Commit

Permalink
Fixed: Erroneous attempt to free memory in SB_DestroySurface()
Browse files Browse the repository at this point in the history
Memory for the BiasSurfaces and vertexillum_ts is block-allocated by
SB_InitForMap(), therefore it can not be free'd piece-wise with the
existing mechanism used by SB_DestroySurface().
  • Loading branch information
danij-deng committed Jun 12, 2013
1 parent ffa0630 commit 41602fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doomsday/client/src/render/rend_bias.cpp
Expand Up @@ -156,8 +156,9 @@ void SB_DestroySurface(BiasSurface *bsuf)
}
}

Z_Free(bsuf->illum);
Z_Free(bsuf);
/// Bias surfaces and vertex illum data is block-allocated.
//Z_Free(bsuf->illum);
//Z_Free(bsuf);
}

int SB_NewSourceAt(coord_t x, coord_t y, coord_t z, float size, float minLight,
Expand Down

0 comments on commit 41602fe

Please sign in to comment.