Skip to content

Commit

Permalink
Protect against getNodes being called before network is up (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
  • Loading branch information
cdjackson authored and hsudbrock committed Oct 3, 2018
1 parent 1f3a1c9 commit 8040d56
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -707,6 +707,9 @@ public ZigBeeNode getNode(IeeeAddress nodeIeeeAddress) {
* @return the set of {@link ZigBeeNode}s
*/
public Set<ZigBeeNode> getNodes() {
if (networkManager == null) {
return Collections.emptySet();
}
return networkManager.getNodes();
}

Expand Down

0 comments on commit 8040d56

Please sign in to comment.