From 3405fd5bad1d3cc74c7db9b9a057f7725e32c050 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 19 Apr 2016 23:14:02 +0100 Subject: [PATCH] fix #3352: assertion trigger while fixing tiles Remove assertion and add warning message instead. --- src/game.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 084f79ac8b..644a48f225 100644 --- a/src/game.c +++ b/src/game.c @@ -813,7 +813,10 @@ void game_fix_save_vars() { { log_error("Null map element at x = %d and y = %d. Fixing...", x, y); mapElement = map_element_insert(x, y, 14, 0); - assert(mapElement != NULL); + if (mapElement == NULL) { + log_error("Unable to fix: Map element limit reached."); + return; + } } } }