summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-04-17 14:23:17 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-04-18 09:43:25 +0000
commit4cce16ce219eec7410399ac2129689a65ca0b2db (patch)
treed0c5c9413ace6c5f74ded4963afb6c9981935719 /basic/source/comp
parentf9578581e61d7c1419e7df84789e25ae0af0aed4 (diff)
tdf#99357: Basic, return if .with pNode null
Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaed9741e in SbiExprNode::GetVar (this=0x0) at /home/julien/lo/libreoffice/basic/source/comp/exprnode.cxx:118 118 if( eNodeType == SbxVARVAL ) (gdb) bt 0 0x00002aaaaed9741e in SbiExprNode::GetVar (this=0x0) at /home/julien/lo/libreoffice/basic/source/comp/exprnode.cxx:118 1 0x00002aaaaed9afd6 in SbiParser::With (this=0x50eac70) at /home/julien/lo/libreoffice/basic/source/comp/loops.cxx:266 2 0x00002aaaaed9d1a7 in SbiParser::Parse (this=0x50eac70) at /home/julien/lo/libreoffice/basic/source/comp/parser.cxx:437 Change-Id: If0ecacd007a14e2ba81181da0fe472ea667c4cb7 Reviewed-on: https://gerrit.libreoffice.org/24147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 2f3dcc44cecf34e00bf7bfc48640915ac87e29b5) Reviewed-on: https://gerrit.libreoffice.org/24153 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/loops.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx
index a77b9e2b3318..2c4f79e6146c 100644
--- a/basic/source/comp/loops.cxx
+++ b/basic/source/comp/loops.cxx
@@ -263,6 +263,8 @@ void SbiParser::With()
SbiExpression aVar( this, SbOPERAND );
SbiExprNode *pNode = aVar.GetExprNode()->GetRealNode();
+ if (!pNode)
+ return;
SbiSymDef* pDef = pNode->GetVar();
// Variant, from 27.6.1997, #41090: empty -> must be Object
if( pDef->GetType() == SbxVARIANT || pDef->GetType() == SbxEMPTY )