diff options
author | Smriti Gupta <smritig@codeaurora.org> | 2014-11-18 14:45:24 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-11-18 02:03:11 -0800 |
commit | 272bbcf1462fbb16fd5437d13ce35987a129b784 (patch) | |
tree | 563b047bde9d22e7b2080da7e6e1f80fe611cdb6 /src | |
parent | cb37db0af281016d3a4d83bc64b378178d7f65cc (diff) | |
download | android_packages_apps_BluetoothExt-272bbcf1462fbb16fd5437d13ce35987a129b784.tar.gz android_packages_apps_BluetoothExt-272bbcf1462fbb16fd5437d13ce35987a129b784.tar.bz2 android_packages_apps_BluetoothExt-272bbcf1462fbb16fd5437d13ce35987a129b784.zip |
SAP: Klocwork issue
This change will fix the Klocwork issue coming
with respect to RfcommInputStream in SAP.
Change-Id: I29fc19e6b44b5eb35999111d45327b6cd4251ddb
CRs-fixed: 758581
Diffstat (limited to 'src')
-rw-r--r-- | src/org/codeaurora/bluetooth/sap/BluetoothSapService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java b/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java index 70697b3..7ffec37 100644 --- a/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java +++ b/src/org/codeaurora/bluetooth/sap/BluetoothSapService.java @@ -1290,7 +1290,8 @@ public class BluetoothSapService extends Service { IpcMsgBuffer.put(SAP_HEADER_SIZE + SAP_MSG_OFF_PARAM_VAL, CONN_ERR); try { - mRfcommOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen); + if (mRfcommOutputStream != null) + mRfcommOutputStream.write(IpcMsgBuffer.array(), 0, WriteLen); } catch (IOException ex) { if (VERBOSE) Log.v(TAG, "mRfcommOutputStream wrtie exception: " + ex.toString()); } |