Fixed cppcheck warnings.

This commit is contained in:
bkaradzic 2012-10-10 22:49:48 -07:00
parent f5295b951d
commit 9556728ee0

View file

@ -904,6 +904,7 @@ bool compileHLSLShaderDx11(CommandLine& _cmdLine, const std::string& _code, IStr
{
printCode(_code.c_str() );
fprintf(stderr, BX_FILE_LINE_LITERAL "Error: 0x%08x %s\n", hr, errorMsg->GetBufferPointer() );
errorMsg->Release();
return false;
}
@ -1082,16 +1083,13 @@ bool compileHLSLShaderDx11(CommandLine& _cmdLine, const std::string& _code, IStr
reflect->Release();
}
if (NULL != code)
{
code->Release();
}
if (NULL != errorMsg)
{
errorMsg->Release();
}
code->Release();
return true;
#else
fprintf(stderr, "HLSL compiler is not supported on this platform.\n");