From 23f14f2dac028507ec77ee45f84ecaa39f6470ba Mon Sep 17 00:00:00 2001 From: Smriti Gupta Date: Tue, 18 Nov 2014 13:10:30 +0530 Subject: PBAP C: Fix klocwork issue This change will fix the klocwork issue coming with respect to BluetoothPbapTestActivity. Change-Id: Iffc45dc24796e718fc75c1d2c55743c871dd9839 CRs-fixed: 758578 --- .../src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java index 0fb64e0..90b771f 100644 --- a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java +++ b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/ServicesFragment.java @@ -467,10 +467,12 @@ public class ServicesFragment extends ListFragment { case PBAP: if (isChecked) { - mActivity.mProfileService.getPbapClient().connect(); + if (mActivity.mProfileService.getPbapClient()!= null) + mActivity.mProfileService.getPbapClient().connect(); buttonView.setEnabled(false); } else { - mActivity.mProfileService.getPbapClient().disconnect(); + if (mActivity.mProfileService.getPbapClient()!= null) + mActivity.mProfileService.getPbapClient().disconnect(); buttonView.setEnabled(false); } break; -- cgit v1.2.3