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

experimental
iwgeric 10 years ago
parent 8f9dfcc7c1
commit b71d94c37c
  1. 2
      jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java

@ -362,7 +362,7 @@ public class AndroidHarnessFragment extends Fragment implements
@Override @Override
public void onDestroyView() { public void onDestroyView() {
logger.fine("onDestroyView"); logger.fine("onDestroyView");
if (splashImageView != null) { if (splashImageView != null && splashImageView.getParent() != null) {
((ViewGroup) splashImageView.getParent()).removeView(splashImageView); ((ViewGroup) splashImageView.getParent()).removeView(splashImageView);
} }
if (view.getParent() != null) { if (view.getParent() != null) {

Loading…
Cancel
Save