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 CSchlipp committed Sep 12, 2020
1 parent 1933a4c commit 7c53bde
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 7c53bde

Please sign in to comment.