The open source OpenXR runtime

a/android: Early out of android_instance_base_cleanup if never init.

Fixes an assert on service exit on Android.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2392>

authored by

Rylie Pavlik and committed by
Marge Bot
aeb574c9 e8389f8b

+8
+3
doc/changes/misc_features/mr.1655.md
··· 1 + --- 2 + - mr.2392 3 + --- 1 4 Handle Android activity lifecycle.
+5
src/xrt/auxiliary/android/android_instance_base.c
··· 149 149 void 150 150 android_instance_base_cleanup(struct android_instance_base *aib, struct xrt_instance *xinst) 151 151 { 152 + if (xinst->android_instance == NULL) { 153 + // Already cleaned up or never initialized. 154 + return; 155 + } 156 + 152 157 assert(&(aib->base) == xinst->android_instance); 153 158 android_lifecycle_callbacks_destroy(&aib->lifecycle_callbacks); 154 159