Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Fix nil pointer dereference panic in thumbnail subscription during shutdown (#892)

Copilotc2cfa10336a8
diff --git a/backend/app/api/main.go b/backend/app/api/main.go
index 0e79e6e1..6627cbb8 100644
--- a/backend/app/api/main.go
+++ b/backend/app/api/main.go
@@ -369,6 +369,11 @@ func run(cfg *config.Config) error {
log.Debug().Msg("received thumbnail generation request from pubsub topic")
if err != nil {
log.Err(err).Msg("failed to receive message from pubsub topic")
+ continue
+ }
+ if msg == nil {
+ log.Warn().Msg("received nil message from pubsub topic")
+ continue
}
groupId, err := uuid.Parse(msg.Metadata["group_id"])
if err != nil {