Commit a8728893 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3dx9_36: Release shader if getting constant table fails in D3DXCompileShader.

parent 531f7956
......@@ -368,7 +368,14 @@ HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO
function, profile, flags, 0, (ID3DBlob **)shader, (ID3DBlob **)error_msgs);
if (SUCCEEDED(hr) && constant_table)
{
hr = D3DXGetShaderConstantTable(ID3DXBuffer_GetBufferPointer(*shader), constant_table);
if (FAILED(hr))
{
ID3DXBuffer_Release(*shader);
*shader = NULL;
}
}
return hr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment