From b71d94c37ceb00ddcf3c7e8ccb28591e4eccde7b Mon Sep 17 00:00:00 2001 From: iwgeric Date: Fri, 30 Jan 2015 13:00:39 -0500 Subject: [PATCH] Fix NPE while destroying the Fragment when a splash screen is used. --- .../src/main/java/com/jme3/app/AndroidHarnessFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java b/jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java index 0de657cb5..1b205d6dd 100644 --- a/jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java +++ b/jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java @@ -362,7 +362,7 @@ public class AndroidHarnessFragment extends Fragment implements @Override public void onDestroyView() { logger.fine("onDestroyView"); - if (splashImageView != null) { + if (splashImageView != null && splashImageView.getParent() != null) { ((ViewGroup) splashImageView.getParent()).removeView(splashImageView); } if (view.getParent() != null) {