Skip to content

Commit b279ffa

Browse files
Update OverlayDrawer.java (#1232)
1 parent e26ac95 commit b279ffa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cameraview/src/main/java/com/otaliastudios/cameraview/overlay/OverlayDrawer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ public void draw(@NonNull Overlay.Target target) {
7878
}
7979
synchronized (mIssue514WorkaroundLock) {
8080
mIssue514Workaround.beforeOverlayUpdateTexImage();
81-
mSurfaceTexture.updateTexImage();
81+
try {
82+
mSurfaceTexture.updateTexImage();
83+
} catch (IllegalStateException e) {
84+
LOG.w("Got IllegalStateException while updating texture contents", e);
85+
}
8286
}
8387
mSurfaceTexture.getTransformMatrix(mTextureDrawer.getTextureTransform());
8488
}

0 commit comments

Comments
 (0)