Skip to content

Commit

Permalink
[lutron] Fix potential NPE if bridge not initialized (#8233)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Adair <[email protected]>
  • Loading branch information
bobadair authored Aug 1, 2020
1 parent b36c6b5 commit c1f5125
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 c1f5125

Please sign in to comment.