mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
fix(napplets): don't crash the :napplet process on memory-trim
Android instantiates the single Amethyst Application in every process, so the sandbox (`:napplet`) shares it and onCreate early-returns there, leaving the lateinit `instance` (AppModules) unset. But onTrimMemory — delivered to every process on real devices — and onTerminate called `instance` unconditionally, crashing the sandbox with UninitializedPropertyAccessException on a trim. Gate both with the cached sandbox-process check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ncMHuBBVHEf7spAoSssde
This commit is contained in:
Binary file not shown.
Reference in New Issue
Block a user