Skip to content

Commit 1e92923

Browse files
committed
Double-check for NPE.
1 parent c9dfe8b commit 1e92923

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/github/xsavikx/androidscreencast/api/injector/ScreenCaptureRunnable.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ private void display(final RawImage rawImage) {
117117
if (qos != null) {
118118
SwingUtilities.invokeLater(() -> {
119119
try {
120-
qos.writeFrame(image, FRAME_DURATION);
120+
if (qos != null)
121+
qos.writeFrame(image, FRAME_DURATION);
121122
} catch (IORuntimeException e) {
122123
log().error("IO exception happened during writing the video frame: {}.", image, e);
123124
}

0 commit comments

Comments
 (0)