From b0b9897f9fcca9c276bf3ffa520b608c5e34dbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Wed, 5 May 2010 19:01:59 +0200 Subject: [PATCH] d3d10: Add argument check in ID3D10Effect::GetVariableByName(). --- dlls/d3d10/effect.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 016e842b1fb..9a6c843395a 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2184,6 +2184,12 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB 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) { struct d3d10_effect_variable *l = &This->local_buffers[i];