Skip to content

Commit

Permalink
Merge pull request #59 from Ponomarev-A/bug/fetchUuidsWithSdp_fix_NPE
Browse files Browse the repository at this point in the history
Fix NPE when call fetchUuidsWithSdp() and UUID's return null
  • Loading branch information
IvBaranov authored Mar 20, 2019
2 parents d77b2ec + 3be6826 commit 24d7e78
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,9 @@ public void subscribe(@NonNull final ObservableEmitter<Parcelable[]> emitter) {
final BroadcastReceiver receiver = new BroadcastReceiver() {
@Override public void onReceive(Context context, Intent intent) {
Parcelable[] uuids = intent.getParcelableArrayExtra(BluetoothDevice.EXTRA_UUID);
emitter.onNext(uuids);
if (uuids != null) {
emitter.onNext(uuids);
}
emitter.onComplete();
}
};
Expand Down

0 comments on commit 24d7e78

Please sign in to comment.