replaced glib function calls to g_return_val_if_fail()
authorHolger Schemel <info@artsoft.org>
Sat, 24 Feb 2024 12:52:09 +0000 (13:52 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 24 Feb 2024 12:52:09 +0000 (13:52 +0100)
src/game_bd/bd_gameplay.c

index 483d21eb258e5bc00ddfc9aad36f0bbc9abd72c4..ea7017b8bcf878b542d65faa8d86a4d7f735f496 100644 (file)
@@ -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);