From e160457abb04f63205914127ae1315f6a9f9cb64 Mon Sep 17 00:00:00 2001 From: EecheE Date: Sat, 25 Jun 2016 18:51:58 -0700 Subject: [PATCH] Fixed null exception if Reset01 is clicked with no active texture. --- renderdocui/Windows/TextureViewer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdocui/Windows/TextureViewer.cs b/renderdocui/Windows/TextureViewer.cs index 3aeb97b63..989d57eed 100644 --- a/renderdocui/Windows/TextureViewer.cs +++ b/renderdocui/Windows/TextureViewer.cs @@ -1451,7 +1451,7 @@ namespace renderdocui.Windows private void UI_SetHistogramRange(FetchTexture tex) { - if (tex.format.compType == FormatComponentType.SNorm) + if (tex != null && tex.format.compType == FormatComponentType.SNorm) rangeHistogram.SetRange(-1.0f, 1.0f); else rangeHistogram.SetRange(0.0f, 1.0f);