fix #3352: assertion trigger while fixing tiles

Remove assertion and add warning message instead.
This commit is contained in:
Ted John 2016-04-19 23:14:02 +01:00
parent 9fd6c9df5f
commit 3405fd5bad
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}
}
}