d3d10: Add argument check in ID3D10Effect::GetVariableByName().

This commit is contained in:
Rico Schüller 2010-05-05 19:01:59 +02:00 committed by Alexandre Julliard
parent 337c5d2730
commit b0b9897f9f
1 changed files with 6 additions and 0 deletions

View File

@ -2184,6 +2184,12 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
if (!name)
{
WARN("Invalid name specified\n");
return (ID3D10EffectVariable *)&null_variable;
}
for (i = 0; i < This->local_buffer_count; ++i) for (i = 0; i < This->local_buffer_count; ++i)
{ {
struct d3d10_effect_variable *l = &This->local_buffers[i]; struct d3d10_effect_variable *l = &This->local_buffers[i];