From f98eb9eb70ff5792e0d07adb852afe57c4769942 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Thu, 2 Nov 2023 07:39:10 +0100 Subject: [PATCH] tests: Return early if initialization fails --- test/tests.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/tests.c b/test/tests.c index 2b6a5a0..aec7cc7 100644 --- a/test/tests.c +++ b/test/tests.c @@ -36,6 +36,9 @@ int main(int argc, char** argv) { al_set_app_name("libsuperderpy"); char* args[2] = {"", "--debug"}; game = libsuperderpy_init(2, args, "test", (struct Params){}); + if (!game) { + return 1; + } libsuperderpy_start(game); int ret = test_timeline() || test_character(); libsuperderpy_destroy(game);