Skip to content

Commit 9ab8be1

Browse files
author
Chris Bellew
committed
Make sure socket isn't null before closing it.
1 parent f057f76 commit 9ab8be1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Voice Control For Plex/src/main/java/com/atomjack/vcfp/activities/NowPlayingActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ public void run() {
221221
} catch (IOException e) {
222222
} finally {
223223
try {
224-
socket.close();
225-
} catch (IOException ex) {
226-
Logger.d("last exception");
224+
if(socket != null)
225+
socket.close();
226+
} catch (Exception ex) {
227227
}
228228
}
229229
}

0 commit comments

Comments
 (0)