Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.

Commit 61aae81

Browse files
author
TebbeUbben
committed
Fix for NullPointerException
1 parent f247e73 commit 61aae81

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sightparser/src/main/java/sugar/free/sightparser/handling/SightService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,10 @@ public void reset() throws RemoteException {
255255
@Override
256256
public void aclDisconnect(String mac) throws RemoteException {
257257
if (verifyAdminCaller("aclDisconnect")) {
258+
if (bluetoothSocket == null) return;
258259
if (getDataStorage().get("DEVICEMAC").equalsIgnoreCase(mac)) {
259260
try {
260-
if (bluetoothSocket != null && bluetoothSocket.isConnected()) {
261+
if (bluetoothSocket.isConnected()) {
261262
Log.d("SightService", "Received ACL disconnect, closing socket...");
262263
bluetoothSocket.close();
263264
}

0 commit comments

Comments
 (0)