From e7f758f38074f3cbc99cb32140552a9f8733f1b2 Mon Sep 17 00:00:00 2001 From: lewa_j Date: Mon, 12 Jan 2026 03:20:58 +0300 Subject: [PATCH] engine: ref: Fix crash on invalid ref lib --- engine/client/ref_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 4cc9106d..ed40be5b 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -466,7 +466,8 @@ static void R_UnloadProgs( void ) if( !ref.hInstance ) return; // deinitialize renderer - ref.dllFuncs.R_Shutdown(); + if (ref.dllFuncs.R_Shutdown) + ref.dllFuncs.R_Shutdown(); Cvar_FullSet( "host_refloaded", "0", FCVAR_READ_ONLY );