[Android] Prevent ClassCastException
Geoffrey Métais
git at videolan.org
Thu Dec 11 13:28:24 CET 2014
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec 11 13:27:25 2014 +0100| [bb2ea38060454301d6dd99c854e59c6932d4138e] | committer: Geoffrey Métais
Prevent ClassCastException
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=bb2ea38060454301d6dd99c854e59c6932d4138e
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index c2e05c6..14ea5e1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -234,7 +234,8 @@ public class MainActivity extends ActionBarActivity {
@Override
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
- ((IBrowser) getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder)).setReadyToDisplay(true);
+ if (getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder) instanceof IBrowser)
+ ((IBrowser) getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder)).setReadyToDisplay(true);
}
};
More information about the Android
mailing list