Commit 84e8ea2f authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

sane.ds: Check return value from sane_get_option_descriptor().

parent 05907c3e
......@@ -394,6 +394,8 @@ static LPDLGTEMPLATEW create_options_page(HDC hdc, int *from_index,
int hold_for_group = 0;
opt = psane_get_option_descriptor(activeDS.deviceHandle, i);
if (!opt)
continue;
if (opt->type == SANE_TYPE_GROUP && split_tabs)
{
if (control_len > 0)
......@@ -407,6 +409,8 @@ static LPDLGTEMPLATEW create_options_page(HDC hdc, int *from_index,
return NULL;
}
}
if (!SANE_OPTION_IS_ACTIVE (opt->cap))
continue;
len = create_item(hdc, opt, ID_BASE + i, &item_tpl, y, &x, &count);
......
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