wined3d: Try to make Coverity shut up (CID 863, 905).
Comparing gl_shaders against NULL after potentially dereferencing it a few lines earlier probably confuses Coverity. Checking num_gl_shaders instead should avoid this.
This commit is contained in:
parent
bdd1206ca5
commit
8ce2506aa8
|
@ -530,7 +530,8 @@ GLuint find_gl_pshader(IWineD3DPixelShaderImpl *shader, const struct ps_compile_
|
|||
|
||||
TRACE("No matching GL shader found, compiling a new shader\n");
|
||||
if(shader->shader_array_size == shader->num_gl_shaders) {
|
||||
if(shader->gl_shaders) {
|
||||
if (shader->num_gl_shaders)
|
||||
{
|
||||
new_size = shader->shader_array_size + max(1, shader->shader_array_size / 2);
|
||||
new_array = HeapReAlloc(GetProcessHeap(), 0, shader->gl_shaders,
|
||||
new_size * sizeof(*shader->gl_shaders));
|
||||
|
|
|
@ -465,7 +465,8 @@ GLuint find_gl_vshader(IWineD3DVertexShaderImpl *shader, const struct vs_compile
|
|||
TRACE("No matching GL shader found, compiling a new shader\n");
|
||||
|
||||
if(shader->shader_array_size == shader->num_gl_shaders) {
|
||||
if(shader->gl_shaders) {
|
||||
if (shader->num_gl_shaders)
|
||||
{
|
||||
new_size = shader->shader_array_size + max(1, shader->shader_array_size / 2);
|
||||
new_array = HeapReAlloc(GetProcessHeap(), 0, shader->gl_shaders,
|
||||
new_size * sizeof(*shader->gl_shaders));
|
||||
|
|
Loading…
Reference in New Issue