From 927b351174f16521ca7c0136dfb476291e012477 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Apr 2018 23:01:15 +0200 Subject: [PATCH] - added missing validation to SetCameraToTexture ZScript function. --- src/r_utility.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }