gl3,gl4: check worldmodel before dlight push

Fix crash if open multiplayer before load map.
This commit is contained in:
Denis Pauk 2023-12-28 08:20:02 +02:00
parent 083ea68a80
commit 4d56576871
2 changed files with 10 additions and 0 deletions

View file

@ -38,6 +38,11 @@ GL3_PushDlights(void)
dlight_t *l;
int i;
if (!gl3_worldmodel)
{
return;
}
/* because the count hasn't advanced yet for this frame */
r_dlightframecount = gl3_framecount + 1;

View file

@ -38,6 +38,11 @@ GL4_PushDlights(void)
dlight_t *l;
int i;
if (!gl4_worldmodel)
{
return;
}
/* because the count hasn't advanced yet for this frame */
r_dlightframecount = gl4_framecount + 1;