From 95a8d2f51f009d2f69b6628174c47e238791f611 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 20 May 2023 20:52:06 +0300 Subject: [PATCH] ref: soft: attempt to fix freeze in decals on software renderer --- ref/soft/r_decals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ref/soft/r_decals.c b/ref/soft/r_decals.c index 57be64d2..ac2b1501 100644 --- a/ref/soft/r_decals.c +++ b/ref/soft/r_decals.c @@ -632,7 +632,7 @@ void R_DecalSurface( msurface_t *surf, decalinfo_t *decalinfo ) { // NOTE: we may have the decal on this surface that come from another level. // check duplicate with same position and texture - while( decal != NULL ) + while( decal != NULL && decal != decal->pnext ) { if( VectorCompare( decal->position, decalinfo->m_Position ) && decal->texture == decalinfo->m_iTexture ) return; // decal already exists, don't place it again