diff --git a/components/stereo/multiview.cpp b/components/stereo/multiview.cpp index de48bf6d17..c5963632ce 100644 --- a/components/stereo/multiview.cpp +++ b/components/stereo/multiview.cpp @@ -167,8 +167,8 @@ namespace Stereo return; } - auto targetTextureObject = texture.getTextureObject(contextId); - if (!sourceTextureObject) + osg::Texture::TextureObject* const targetTextureObject = texture.getTextureObject(contextId); + if (targetTextureObject == nullptr) { Log(Debug::Error) << "Texture2DViewSubloadCallback: Texture2D did not have a texture object"; return;