My NDK-based Android App is using android_native_glue.c that defines the android_app structure.
Member of this structure is android_app.window and the source-code comments have this to said about it:
// When non-NULL, this is the window surface that the app can draw in.
ANativeWindow* window;
Judging from my Google Play Developer Console crash reports, I see that there are a lot of crashes where this window pointer is nil, when I am handling a APP_CMD_INIT_WINDOW command.
What is the reason for a NativeActivity getting APP_CMD_INIT_WINDOW without a window set?
What is the best response to handle a nil window to your native app?