[surepetcare] Fix NPE (#16088)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2023-12-20 18:25:51 +01:00 committed by GitHub
parent 3e7162d69a
commit 90f66cbb82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ public class SurePetcareDiscoveryService extends AbstractDiscoveryService
@Override @Override
public void setThingHandler(@Nullable ThingHandler handler) { public void setThingHandler(@Nullable ThingHandler handler) {
if (handler instanceof SurePetcareBridgeHandler bridgeHandler) { if (handler instanceof SurePetcareBridgeHandler bridgeHandler) {
this.bridgeHandler = bridgeHandler;
bridgeUID = bridgeHandler.getUID(); bridgeUID = bridgeHandler.getUID();
} }
} }