diff options
Diffstat (limited to 'basic/source/comp/exprnode.cxx')
-rw-r--r-- | basic/source/comp/exprnode.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index 2ae9903fec..bf891bc5a2 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -100,6 +100,15 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId ) nTypeStrId = nId; } +// new <type> +SbiExprNode::SbiExprNode( SbiParser* p, USHORT nId ) +{ + BaseInit( p ); + + eType = SbxOBJECT; + eNodeType = SbxNEW; + nTypeStrId = nId; +} // AB: 17.12.95, Hilfsfunktion fuer Ctor fuer einheitliche Initialisierung void SbiExprNode::BaseInit( SbiParser* p ) @@ -253,7 +262,8 @@ void SbiExprNode::CollectBits() void SbiExprNode::FoldConstants() { if( IsOperand() || eTok == LIKE ) return; - pLeft->FoldConstants(); + if( pLeft ) + pLeft->FoldConstants(); if( pRight ) { pRight->FoldConstants(); @@ -431,7 +441,7 @@ void SbiExprNode::FoldConstants() } } } - else if( pLeft->IsNumber() ) + else if( pLeft && pLeft->IsNumber() ) { nVal = pLeft->nVal; delete pLeft; |