From f7d17ba512b8cc2b8d469409f4b4985f6174b11c Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:45:28 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20matchingData=E3=81=8Cnil=E3=81=AE?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=82=92=E8=80=83=E6=85=AE=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bench/benchmarker/world/chair.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bench/benchmarker/world/chair.go b/bench/benchmarker/world/chair.go index 0a55e93d..81aa572a 100644 --- a/bench/benchmarker/world/chair.go +++ b/bench/benchmarker/world/chair.go @@ -477,6 +477,9 @@ func (c *Chair) HandleNotification(event NotificationEvent) error { } func (c *Chair) ValidateChairNotificationEvent(rideID string, event ChairNotificationEvent) error { + if c.matchingData == nil { + return fmt.Errorf("進行中のライドがないときに進行中状態の通知が届きました (ride_id: %s)", rideID) + } if event.User.ID != c.matchingData.User.ID { return fmt.Errorf("ユーザーのIDが一致しません。(ride_id: %s, got: %s, want: %s", rideID, event.User.ID, c.matchingData.User.ID) }