summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-12 14:13:36 +0100
committerJulien Nabet <serval2412@yahoo.fr>2016-06-12 13:48:56 +0000
commit7c983445656e1f1942cf2d7398a77342004ed168 (patch)
tree1ee873b02172fa3ff62eaabf63c4055485cb8fa2
parent52a115fad6a4121f659fd029c9fd9102b6faa9ee (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 Change-Id: Ic5a4b66028db6ba4aea08baf5bf4a672f71745a0 Reviewed-on: https://gerrit.libreoffice.org/26197 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
-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 dfa4b84fa541..fb4fc1592579 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -323,7 +323,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 )
{