[Refs #87: Static Analysis] Check that section enum is valid

This commit is contained in:
baldurk
2014-10-05 16:28:47 +01:00
parent b791cb59de
commit 5e9cdde3a0
+1 -1
View File
@@ -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];