Module: wine Branch: master Commit: 84e8ea2fdcba6ea76f023e8bd584a78896066e83 URL: http://source.winehq.org/git/wine.git/?a=commit;h=84e8ea2fdcba6ea76f023e8bd5...
Author: Lei Zhang thestig@google.com Date: Fri Nov 9 01:53:07 2007 -0800
sane.ds: Check return value from sane_get_option_descriptor().
---
dlls/sane.ds/ui.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c index 0dff3e0..517f1fb 100644 --- a/dlls/sane.ds/ui.c +++ b/dlls/sane.ds/ui.c @@ -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);