OSDN Git Service

Fix NPE when reconnecting camera.
authorAngus Kong <shkong@google.com>
Mon, 1 Apr 2013 16:55:24 +0000 (09:55 -0700)
committerAngus Kong <shkong@google.com>
Mon, 1 Apr 2013 16:55:24 +0000 (09:55 -0700)
bug:8513852
Change-Id: I45150e5519604f695d25c830262c8b6eb363b1d3

src/com/android/camera/CameraManager.java

index 65b2bb8..e89c2eb 100644 (file)
@@ -334,7 +334,7 @@ public class CameraManager {
                 holder = mReconnectExceptionQueue.take();
             } catch (InterruptedException ex) {
             }
-            if (holder == null || holder.ex != null) {
+            if (holder != null && holder.ex != null) {
                 throw holder.ex;
             }
         }