From 05258d0277e822908c255da8e3d14da0e0656fc2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 12 Jun 2016 14:13:36 +0100 Subject: 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 Tested-by: Julien Nabet (cherry picked from commit 7c983445656e1f1942cf2d7398a77342004ed168) Reviewed-on: https://gerrit.libreoffice.org/26248 Reviewed-by: Christian Lohmaier Reviewed-by: Michael Stahl Tested-by: Jenkins --- extensions/source/scanner/scanwin.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ) { -- cgit