summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-12 14:13:36 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2016-06-14 11:40:50 +0000
commit05258d0277e822908c255da8e3d14da0e0656fc2 (patch)
tree4295c1e11b55b1c2994f3fbbdb3d96205d230c9e
parent95eb6aaa812b650708f9e7db3489696beeaf3eff (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>
-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 )
{