mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- fix nullptr crash in player.camera reference when player.camera is nullptr
This commit is contained in:
parent
f954df7a00
commit
7c9d8a0b99
2 changed files with 4 additions and 2 deletions
|
@ -256,7 +256,8 @@ sector_t *FGLRenderer::RenderView(player_t* player)
|
|||
NoInterpolateView = false;
|
||||
|
||||
// Shader start time does not need to be handled per level. Just use the one from the camera to render from.
|
||||
gl_RenderState.CheckTimer(player->camera->Level->ShaderStartTime);
|
||||
if (player->camera)
|
||||
gl_RenderState.CheckTimer(player->camera->Level->ShaderStartTime);
|
||||
// prepare all camera textures that have been used in the last frame.
|
||||
// This must be done for all levels, not just the primary one!
|
||||
for (auto Level : AllLevels())
|
||||
|
|
|
@ -404,7 +404,8 @@ sector_t *VulkanFrameBuffer::RenderView(player_t *player)
|
|||
NoInterpolateView = false;
|
||||
|
||||
// Shader start time does not need to be handled per level. Just use the one from the camera to render from.
|
||||
GetRenderState()->CheckTimer(player->camera->Level->ShaderStartTime);
|
||||
if (player->camera)
|
||||
GetRenderState()->CheckTimer(player->camera->Level->ShaderStartTime);
|
||||
// prepare all camera textures that have been used in the last frame.
|
||||
// This must be done for all levels, not just the primary one!
|
||||
for (auto Level : AllLevels())
|
||||
|
|
Loading…
Reference in a new issue