aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-24 20:39:41 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-24 20:39:41 -0500
commitd19ecb65e0b7d53b84e930adcf82a2cc1e401483 (patch)
treed1bd5ba53716b101c9d73c5dbe1036d501490581
parentf7bb831091a6e3bb8bf7e7927bb8470e626ea58f (diff)
Fixed bug in Bridge.GetAllLights where light.Bridge was not assigned and causing a nil pointer.
-rw-r--r--bridge.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/bridge.go b/bridge.go
index 61960fa..dc2b6ff 100644
--- a/bridge.go
+++ b/bridge.go
@@ -239,6 +239,7 @@ func (bridge *Bridge) GetAllLights() ([]Light, error) {
if err != nil {
return []Light{}, errors.New("Unable to convert light index to integer. ")
}
+ light.Bridge = bridge
lights = append(lights, light)
}
return lights, nil