mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #13204 from SamGondelman/hudCrash
Protect against null hudTexture
This commit is contained in:
commit
45beb686a0
2 changed files with 2 additions and 2 deletions
|
@ -586,7 +586,7 @@ void OpenGLDisplayPlugin::updateFrameData() {
|
|||
|
||||
std::function<void(gpu::Batch&, const gpu::TexturePointer&, bool mirror)> OpenGLDisplayPlugin::getHUDOperator() {
|
||||
return [this](gpu::Batch& batch, const gpu::TexturePointer& hudTexture, bool mirror) {
|
||||
if (_hudPipeline) {
|
||||
if (_hudPipeline && hudTexture) {
|
||||
batch.enableStereo(false);
|
||||
batch.setPipeline(mirror ? _mirrorHUDPipeline : _hudPipeline);
|
||||
batch.setResourceTexture(0, hudTexture);
|
||||
|
|
|
@ -428,7 +428,7 @@ void HmdDisplayPlugin::HUDRenderer::updatePipeline() {
|
|||
std::function<void(gpu::Batch&, const gpu::TexturePointer&, bool mirror)> HmdDisplayPlugin::HUDRenderer::render(HmdDisplayPlugin& plugin) {
|
||||
updatePipeline();
|
||||
return [this](gpu::Batch& batch, const gpu::TexturePointer& hudTexture, bool mirror) {
|
||||
if (pipeline) {
|
||||
if (pipeline && hudTexture) {
|
||||
batch.setPipeline(pipeline);
|
||||
|
||||
batch.setInputFormat(format);
|
||||
|
|
Loading…
Reference in a new issue