From 8a9be277ae00dd244d5b1f94a4c57611cf4f56e3 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 3 May 2024 04:01:24 -0400 Subject: [PATCH] Fix crashes on non-special stars. --- sc2/src/uqm/grpinfo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sc2/src/uqm/grpinfo.c b/sc2/src/uqm/grpinfo.c index f0b82e228..9eaaa6f65 100644 --- a/sc2/src/uqm/grpinfo.c +++ b/sc2/src/uqm/grpinfo.c @@ -279,8 +279,11 @@ BuildGroups (void) DWORD d_squared; const char *const race_name = HomeWorld[Index]; - if (race_name && !strcmp(CurStarDescPtr->supplement, race_name) && - (CurStarDescPtr->supArg == 0 || !strcmp(CurStarDescPtr->supArg, "Homeworld"))) + if (race_name && + (CurStarDescPtr->supplement + && !strcmp(CurStarDescPtr->supplement, race_name)) + && (CurStarDescPtr->supArg == 0 + || !strcmp(CurStarDescPtr->supArg, "Homeworld"))) { // In general, there are always ships at the Homeworld for // the races specified in HomeWorld[] array. BestIndex = Index;