summary refs log tree commit diff
path: root/src/tilemap.c
diff options
context:
space:
mode:
authorzlago2024-10-23 19:17:26 +0200
committerzlago2024-10-23 19:17:26 +0200
commitb12606899c98d7fc7a120c2b79797b5c45283ad2 (patch)
treef210a037fee0f2346bae8a10d1edc1b445b4324f /src/tilemap.c
parentaf6acead62498bc49065ef828e388bcd511ce54d (diff)
hacky save system
Diffstat (limited to 'src/tilemap.c')
-rw-r--r--src/tilemap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tilemap.c b/src/tilemap.c
index e7ee1d4..34e7c43 100644
--- a/src/tilemap.c
+++ b/src/tilemap.c
@@ -102,6 +102,9 @@ void tilemap_foreground(struct tilemap *tilemap, int x, int y, int w, int h) {
 }
 
 void tilemap_free(struct tilemap *tilemap) {
+	if (tilemap == NULL) {
+		return;
+	}
 	SDL_DestroyTexture(tilemap->tileset);
 	SDL_DestroyTexture(tilemap->wang_tileset);
 	free(tilemap->parallax);