commit 6457f6d14e47f60883a3731a29c9eb80d120594f
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-05-23T12:10:34Z |
| subject | Fixed nil pointer error |
commit 6457f6d14e47f60883a3731a29c9eb80d120594f
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-05-23T12:10:34Z
Fixed nil pointer error
---
datasources/kmb/BusStop.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/datasources/kmb/BusStop.go b/datasources/kmb/BusStop.go
index 79b7ffe..b77e645 100644
--- a/datasources/kmb/BusStop.go
+++ b/datasources/kmb/BusStop.go
@@ -43,8 +43,10 @@ func (this *BusStop) Reload() {
searchData := []*string{}
searchData = append(searchData, &this.BusStopId)
- for _, v := range *this.Name {
- searchData = append(searchData, &v)
+ if this.Name != nil {
+ for _, v := range *this.Name {
+ searchData = append(searchData, &v)
+ }
}
this.Key = &this.BusStopId