From: Holger Schemel Date: Sat, 24 Feb 2024 12:52:09 +0000 (+0100) Subject: replaced glib function calls to g_return_val_if_fail() X-Git-Tag: 4.4.0.0-test-1~293 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c68636ee7a97cca568bc2b86737ed0ec3d1356ef;p=rocksndiamonds.git replaced glib function calls to g_return_val_if_fail() --- 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);