OSDN Git Service

Fix a crash.
authorTeng-Hui Zhu <ztenghui@google.com>
Fri, 11 May 2012 18:52:04 +0000 (11:52 -0700)
committerTeng-Hui Zhu <ztenghui@google.com>
Fri, 11 May 2012 20:00:03 +0000 (13:00 -0700)
End can happen when error happens, but media controller may be not ready yet.

bug:5340224
Change-Id: I94607dfdf26d2dc4c7bbc9c2a62f98deccb8d198

core/java/android/webkit/HTML5VideoFullScreen.java

index ea8f316..62bc502 100644 (file)
@@ -323,7 +323,9 @@ public class HTML5VideoFullScreen extends HTML5VideoView
 
     @Override
     public void showControllerInFullScreen() {
-        mMediaController.show(0);
+        if (mMediaController != null) {
+            mMediaController.show(0);
+        }
     }
 
     // Other listeners functions: