mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-12 05:15:46 -04:00
Android: Fix crash in main activity
This commit is contained in:
@ -54,6 +54,9 @@ public class AndroidHostInterface
|
||||
return mInstance != null;
|
||||
}
|
||||
|
||||
static public boolean hasInstance() {
|
||||
return mInstance != null;
|
||||
}
|
||||
static public AndroidHostInterface getInstance() {
|
||||
return mInstance;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (!AndroidHostInterface.createInstance(this)) {
|
||||
if (!AndroidHostInterface.hasInstance() && !AndroidHostInterface.createInstance(this)) {
|
||||
Log.i("MainActivity", "Failed to create host interface");
|
||||
throw new RuntimeException("Failed to create host interface");
|
||||
}
|
||||
|
Reference in New Issue
Block a user