From ebdcba9afba3a0a3dfc900384c6e3c507b01b810 Mon Sep 17 00:00:00 2001 From: Pradana AUMARS Date: Mon, 28 Jun 2021 16:13:48 +0200 Subject: [PATCH] Continue main loop only if p is non-null --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 25d1c1e..24d3fd2 100644 --- a/src/main.c +++ b/src/main.c @@ -15,6 +15,10 @@ int main (int argc, char* args[]) } p = Pong_init(); + if (p == NULL) { + printf("Pong failed to initialise!\n"); + return 1; + } Pong_render(p); while (!start) {