mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-15 03:15:24 +00:00
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>
This commit is contained in:
parent
e8389f8b48
commit
aeb574c96c
|
@ -1 +1,4 @@
|
|||
---
|
||||
- mr.2392
|
||||
---
|
||||
Handle Android activity lifecycle.
|
||||
|
|
|
@ -149,6 +149,11 @@ android_instance_base_init(struct android_instance_base *aib,
|
|||
void
|
||||
android_instance_base_cleanup(struct android_instance_base *aib, struct xrt_instance *xinst)
|
||||
{
|
||||
if (xinst->android_instance == NULL) {
|
||||
// Already cleaned up or never initialized.
|
||||
return;
|
||||
}
|
||||
|
||||
assert(&(aib->base) == xinst->android_instance);
|
||||
android_lifecycle_callbacks_destroy(&aib->lifecycle_callbacks);
|
||||
|
||||
|
|
Loading…
Reference in a new issue