@@ -310,6 +310,9 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
}
AppState *as = SDL_calloc(1, sizeof(AppState));
+ if (!as) {
+ return SDL_APP_FAILURE;
+ }
*appstate = as;