mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-29 02:45:41 -04:00
Android: Fix crash if activity is killed before returning
This commit is contained in:
parent
c18278e664
commit
8f74d4718f
@ -235,6 +235,12 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (!AndroidHostInterface.hasInstanceAndEmulationThreadIsRunning()) {
|
||||
// we must've got killed off in the background :(
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
if (requestCode == REQUEST_CODE_SETTINGS) {
|
||||
if (AndroidHostInterface.getInstance().isEmulationThreadRunning())
|
||||
applySettings();
|
||||
|
Loading…
x
Reference in New Issue
Block a user