d3dx9: Return NULL for child parameter's annotation in get_parameter_by_name().

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2017-07-19 16:43:05 +03:00 committed by Alexandre Julliard
parent ec199c9e0e
commit f09bf52d5d

View file

@ -931,7 +931,9 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
return get_parameter_by_name(NULL, temp_parameter, part);
case '@':
return get_annotation_by_name(temp_parameter->annotation_count, temp_parameter->annotations, part);
return parameter ? NULL
: get_annotation_by_name(temp_parameter->annotation_count,
temp_parameter->annotations, part);
case '[':
return get_parameter_element_by_name(temp_parameter, part);