diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c index 6c877a2360f..0dff3e03009 100644 --- a/dlls/sane.ds/ui.c +++ b/dlls/sane.ds/ui.c @@ -739,6 +739,11 @@ static INT_PTR InitializeDialog(HWND hwnd) rc = psane_control_option(activeDS.deviceHandle, 0, SANE_ACTION_GET_VALUE, &optcount, NULL); + if (rc != SANE_STATUS_GOOD) + { + ERR("Unable to read number of options\n"); + return FALSE; + } for ( i = 1; i < optcount; i++) {