From 5e9cdde3a0758bbde29dab93c579c89a0ebce007 Mon Sep 17 00:00:00 2001 From: baldurk Date: Sun, 5 Oct 2014 16:28:47 +0100 Subject: [PATCH] [Refs #87: Static Analysis] Check that section enum is valid --- renderdoc/core/core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/core/core.cpp b/renderdoc/core/core.cpp index 1f116fe2f..584f84d51 100644 --- a/renderdoc/core/core.cpp +++ b/renderdoc/core/core.cpp @@ -626,7 +626,7 @@ void RenderDoc::SetLogFile(const wchar_t *logFile) void RenderDoc::SetProgress(LoadProgressSection section, float delta) { - if(m_ProgressPtr == NULL) + if(m_ProgressPtr == NULL || section < 0 || section >= NumSections) return; float weights[NumSections];