summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-12 14:13:36 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-14 19:52:33 +0000
commit03d2fd41266083f4aa200bce3f27c5b5f8cbba42 (patch)
tree9c4c43dcc36ee49a2bb56e3ceaf18157fefe40a5
parent3491227ca0bd616277faad48688dc0a2042fd19a (diff)
Resolves: tdf#92478 avoid crash on using scanner on windows x64
which appears to correspond to backtrace http://crashreport.libreoffice.org/stats/crash_details/ad46ef89-6b98-44f9-b060-ccb25015269d (prevents the crash only, does not enable scanning on x64) Change-Id: Ic5a4b66028db6ba4aea08baf5bf4a672f71745a0 Reviewed-on: https://gerrit.libreoffice.org/26197 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 7c983445656e1f1942cf2d7398a77342004ed168) Reviewed-on: https://gerrit.libreoffice.org/26248 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 05258d0277e822908c255da8e3d14da0e0656fc2) Reviewed-on: https://gerrit.libreoffice.org/26255 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--extensions/source/scanner/scanwin.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index 0ce2ab719b5d..67058e5ad9ce 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -324,7 +324,10 @@ bool ImpTwain::ImplHandleMsg( void* pMsg )
PTWAINMSG pMess = (PTWAINMSG) pMsg;
TW_EVENT aEvt = { pMess, MSG_NULL };
- nRet = PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_EVENT, MSG_PROCESSEVENT, &aEvt );
+ if (pDSM)
+ nRet = PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_EVENT, MSG_PROCESSEVENT, &aEvt );
+ else
+ nRet = TWRC_NOTDSEVENT;
if( aEvt.TWMessage != MSG_NULL )
{