Fix error freeing null pointer on exit for debug builds

Changing comments to 'if 0' in [0] somehow caused null pointer
dereference on exit. Replace 'if 0' with C++ style comments to resolve.

[0]: 7b87c160f8
This commit is contained in:
Campbell Barton
2024-10-24 14:01:06 +11:00
parent 0475054b28
commit 1ba6b74cdf

View File

@@ -37,11 +37,10 @@ vec3 debug_random_color(int v)
void debug_tile_print(ShadowTileData tile, ivec4 tile_coord)
{
/* This `printf` injection is based on string literal detection. Comment it out unless needed. */
#if 0
printf("Tile (%u, %u) in Tilemap %u: page(%u, %u, %u), cache_index %u",
tile_coord.x, tile_coord.y, tile_coord.z, tile.page.x, tile.page.y, tile.page.z,
tile.cache_index);
#endif
/* NOTE: using `#if 0` here causes a crash on exit for debug builds, stick to C++ comments. */
// printf("Tile (%u, %u) in Tilemap %u: page(%u, %u, %u), cache_index %u",
// tile_coord.x, tile_coord.y, tile_coord.z, tile.page.x, tile.page.y, tile.page.z,
// tile.cache_index);
}
vec3 debug_tile_state_color(ShadowTileData tile)