Revert "Add SIGSEGV guard to highlight patch loading."

This reverts commit f6b2f4bd23.
This commit is contained in:
NepDisk 2025-10-19 22:01:02 -04:00
parent 65cf091573
commit efb610713f

View file

@ -381,41 +381,9 @@ void K_LoadKartHUDGraphics(void)
buffer[7] = '0'+(i+1);
HU_UpdatePatch(&kp_facehighlight[i], "%s", buffer);
// Blind-reading the patch causes a SIGSEGV on some machines, so let's try a guard.
patch_t *highlight = kp_facehighlight[i];
if ((highlight) && (highlight != NULL))
{
highlight->pivot.x = highlight->width / 2;
highlight->pivot.y = highlight->height / 2;
highlight->alignflags |= PATCHALIGN_USEPIVOTS;
}
else
{
CONS_Printf("Patch %s is NULL! Attempting to resolve this issue...", buffer);
UINT8 tries = 0;
while ((!highlight) || (highlight == NULL))
{
tries++;
HU_UpdatePatch(&kp_facehighlight[i], "%s", buffer);
highlight = kp_facehighlight[i];
if ((highlight) && (highlight != NULL))
{
highlight->pivot.x = highlight->width / 2;
highlight->pivot.y = highlight->height / 2;
highlight->alignflags |= PATCHALIGN_USEPIVOTS;
}
else if (tries >= YOURTAKINGTOOLONG)
{
I_Error("Game failed to resolve NULL \"%s\" patch after %d tries (i = %d)\n", buffer, tries, i);
break;
}
}
CONS_Printf("Success: resolved patch issue in %d tries!", i);
}
kp_facehighlight[i]->pivot.x = kp_facehighlight[i]->width / 2;
kp_facehighlight[i]->pivot.y = kp_facehighlight[i]->height / 2;
kp_facehighlight[i]->alignflags |= PATCHALIGN_USEPIVOTS;
}
// Special minimap icons