From ee61fc879bc4edf1ed2e70d3f3767bd320b818f4 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Thu, 4 Dec 2025 07:27:47 +1100 Subject: [PATCH] Add nil check for scraped measurements (#6367) --- pkg/stashbox/performer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/stashbox/performer.go b/pkg/stashbox/performer.go index 56d7b109e..38824eba1 100644 --- a/pkg/stashbox/performer.go +++ b/pkg/stashbox/performer.go @@ -125,8 +125,8 @@ func translateGender(gender *graphql.GenderEnum) *string { return nil } -func formatMeasurements(m graphql.MeasurementsFragment) *string { - if m.BandSize != nil && m.CupSize != nil && m.Hip != nil && m.Waist != nil { +func formatMeasurements(m *graphql.MeasurementsFragment) *string { + if m != nil && m.BandSize != nil && m.CupSize != nil && m.Hip != nil && m.Waist != nil { ret := fmt.Sprintf("%d%s-%d-%d", *m.BandSize, *m.CupSize, *m.Waist, *m.Hip) return &ret } @@ -209,7 +209,7 @@ func performerFragmentToScrapedPerformer(p graphql.PerformerFragment) *models.Sc Name: &p.Name, Disambiguation: p.Disambiguation, Country: p.Country, - Measurements: formatMeasurements(*p.Measurements), + Measurements: formatMeasurements(p.Measurements), CareerLength: formatCareerLength(p.CareerStartYear, p.CareerEndYear), Tattoos: formatBodyModifications(p.Tattoos), Piercings: formatBodyModifications(p.Piercings),