mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-10 23:29:43 +00:00
Avoid NPE on showing splash screen
This commit is contained in:
parent
5692c1dc95
commit
8d3de3ddd0
@ -245,6 +245,7 @@ public class Apple2Activity extends Activity {
|
||||
|
||||
// Apparently not good to leave popup/dialog windows showing when backgrounding.
|
||||
// Dismiss these popups to avoid android.view.WindowLeaked issues
|
||||
synchronized (this) {
|
||||
dismissAllMenus();
|
||||
|
||||
mSplashScreen = null;
|
||||
@ -252,6 +253,7 @@ public class Apple2Activity extends Activity {
|
||||
|
||||
nativeOnPause(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
@ -455,8 +457,12 @@ public class Apple2Activity extends Activity {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (Apple2Activity.this) {
|
||||
if (mSplashScreen != null) {
|
||||
mSplashScreen.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user