diff --git a/src/r_utility.cpp b/src/r_utility.cpp index 82f8f6caf..3a2579077 100644 --- a/src/r_utility.cpp +++ b/src/r_utility.cpp @@ -1058,7 +1058,8 @@ DEFINE_ACTION_FUNCTION(_TexMan, SetCameraToTexture) PARAM_STRING(texturename); // [ZZ] there is no point in having this as FTextureID because it's easier to refer to a cameratexture by name and it isn't executed too often to cache it. PARAM_FLOAT(fov); FTextureID textureid = TexMan.CheckForTexture(texturename, ETextureType::Wall, FTextureManager::TEXMAN_Overridable); - FCanvasTextureInfo::Add(viewpoint, textureid, fov); + if (textureid.isValid()) + FCanvasTextureInfo::Add(viewpoint, textureid, fov); return 0; }