Skip to content

Commit

Permalink
[lutron] Fix potential NPE if bridge not initialized (openhab#8233)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Adair <[email protected]>
  • Loading branch information
bobadair authored and markus7017 committed Sep 18, 2020
1 parent 61c7a8f commit 01b0e23
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ private synchronized void asyncDiscoveryTask() {

private void readDeviceDatabase() {
Project project = null;

if (bridgeHandler == null || bridgeHandler.getIPBridgeConfig() == null) {
logger.debug("Unable to get bridge config. Exiting.");
return;
}
String discFileName = bridgeHandler.getIPBridgeConfig().discoveryFile;
String address = "http://" + bridgeHandler.getIPBridgeConfig().ipAddress + "/DbXmlInfo.xml";

Expand Down

0 comments on commit 01b0e23

Please sign in to comment.