summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Kirk <askirk@umich.edu>2017-01-24 16:09:59 -0500
committerAustin Kirk <askirk@umich.edu>2017-01-24 16:09:59 -0500
commit686096ed4a0bab97195b757c8cc93b7a8053cb09 (patch)
tree2dc947e75a5c8933d5401ea8ea60d20f2515d061
parent5a5ad935e708f6160a77c61801e756284921cbc8 (diff)
downloadsdl_android-bugfix/issue_384.tar.gz
Catching NPE on mmOutStreambugfix/issue_384
-Comment specifies it is only to catch mmOutStream NPE (don’t be lazy)
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/transport/MultiplexBluetoothTransport.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdl_android_lib/src/com/smartdevicelink/transport/MultiplexBluetoothTransport.java b/sdl_android_lib/src/com/smartdevicelink/transport/MultiplexBluetoothTransport.java
index f2ddf2a52..0215da076 100644
--- a/sdl_android_lib/src/com/smartdevicelink/transport/MultiplexBluetoothTransport.java
+++ b/sdl_android_lib/src/com/smartdevicelink/transport/MultiplexBluetoothTransport.java
@@ -731,7 +731,7 @@ public class MultiplexBluetoothTransport {
//This would be a good spot to log out all bytes received
mmOutStream.write(buffer, offset, count);
//Log.w(TAG, "Wrote out to device: bytes = "+ count);
- } catch (IOException e) {
+ } catch (IOException|NullPointerException e) { // STRICTLY to catch mmOutStream NPE
// Exception during write
//OMG! WE MUST NOT BE CONNECTED ANYMORE! LET THE USER KNOW
Log.e(TAG, "Error sending bytes to connected device!");