Ver Fonte

Fix NPE while destroying the Fragment when a splash screen is used.

iwgeric há 10 anos atrás
pai
commit
b71d94c37c

+ 1 - 1
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) {