Continue main loop only if p is non-null

This commit is contained in:
Pradana AUMARS 2021-06-28 16:13:48 +02:00
parent 5b18911111
commit ebdcba9afb
1 changed files with 4 additions and 0 deletions

View File

@ -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) {