[vulkan] Clear lights when the scene is cleared

Fixes a segfault when shutting down my test program.
This commit is contained in:
Bill Currie 2022-05-07 12:12:02 +09:00
parent 8795b8eb91
commit 8204e8a8c1
2 changed files with 2 additions and 1 deletions

View file

@ -111,6 +111,7 @@ vulkan_R_ClearState (void)
R_ClearEfrags ();
R_ClearDlights ();
R_ClearParticles ();
Vulkan_LoadLights (0, vulkan_ctx);
}
static void

View file

@ -697,5 +697,5 @@ Vulkan_LoadLights (scene_t *scene, vulkan_ctx_t *ctx)
lightingctx_t *lctx = ctx->lighting_context;
lctx->scene = scene;
lctx->ldata = scene->lights;
lctx->ldata = scene ? scene->lights : 0;
}