From c68636ee7a97cca568bc2b86737ed0ec3d1356ef Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 24 Feb 2024 13:52:09 +0100 Subject: [PATCH] replaced glib function calls to g_return_val_if_fail() --- src/game_bd/bd_gameplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 483d21eb..ea7017b8 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -158,7 +158,9 @@ static void load_cave(GdGame *game) GdCave *gd_create_snapshot(GdGame *game) { GdCave *snapshot; - g_return_val_if_fail (game->cave != NULL, NULL); + + if (game->cave == NULL) + return NULL; /* make an exact copy */ snapshot = gd_cave_new_from_cave(game->cave); -- 2.34.1