Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/DesktopView.java

Issue 47873012: Fix NullPointerException when connected but no video frame decoded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/DesktopView.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
index 26cf83a6e5bc4b5f7b537f2e9e06ba8eb4231a3b..e9ed440034f973c9159482d8283b8ebbb9fdac2e 100644
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
+++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
@@ -83,6 +83,11 @@ public class DesktopView extends SurfaceView implements DesktopViewInterface, Ru
}
Bitmap image = JniInterface.getVideoFrame();
+ if (image == null) {
+ // This can happen if the client is connected, but a complete video frame has not yet
+ // been decoded.
+ return;
+ }
int width = image.getWidth();
int height = image.getHeight();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698