Ricardo Filipe : sane.ds: Check dead stored status (llvm/clang).
Alexandre Julliard
julliard at winehq.org
Fri Nov 21 06:54:57 CST 2008
Module: wine
Branch: master
Commit: 66b732e4f8e16421eaea4c995b53dd5f1f0c2bcd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=66b732e4f8e16421eaea4c995b53dd5f1f0c2bcd
Author: Ricardo Filipe <ricardo_barbano at hotmail.com>
Date: Wed Nov 19 20:29:53 2008 +0000
sane.ds: Check dead stored status (llvm/clang).
---
dlls/sane.ds/ds_image.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/sane.ds/ds_image.c b/dlls/sane.ds/ds_image.c
index c3e7082..9a88bb5 100644
--- a/dlls/sane.ds/ds_image.c
+++ b/dlls/sane.ds/ds_image.c
@@ -100,8 +100,15 @@ TW_UINT16 SANE_ImageInfoGet (pTW_IDENTITY pOrigin,
{
/* return general image description information about the image about to be transferred */
status = psane_get_parameters (activeDS.deviceHandle, &activeDS.sane_param);
- activeDS.sane_param_valid = TRUE;
TRACE("Getting parameters\n");
+ if (status != SANE_STATUS_GOOD)
+ {
+ WARN("psane_get_parameters: %s\n", psane_strstatus (status));
+ psane_cancel (activeDS.deviceHandle);
+ activeDS.twCC = TWCC_OPERATIONERROR;
+ return TWRC_FAILURE;
+ }
+ activeDS.sane_param_valid = TRUE;
}
pImageInfo->XResolution.Whole = -1;
More information about the wine-cvs
mailing list