diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-10-22 11:26:20 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-10-22 11:26:20 +0200 |
commit | 48cdc0318b348c51742339b243dc05546148b335 (patch) | |
tree | 639db65a9e265cbc211e35206bd7b0a3af4674da /dbaccess/source | |
parent | execute filters-test in headless mode (diff) | |
download | core-48cdc0318b348c51742339b243dc05546148b335.tar.gz core-48cdc0318b348c51742339b243dc05546148b335.zip |
Fix fdo#38286. Perhaps it could be simplified
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 8fc9e70e313b..44c250383c66 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -3213,7 +3213,18 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p OQueryController& rController = static_cast<OQueryController&>(getController()); sal_Int32 nDataType = DataType::DOUBLE; ::rtl::OUString sFieldName = sFunctionTerm; - OSQLParseNode* pFunctionName = pNode->getChild(0); + const OSQLParseNode* pFunctionName; + // Fix fdo#38286 : crash when constant in the query + // TODO : is it possible to have a child or children in the pNode ? + // if not this part could be simplified + if (pNode->count()) + { + pFunctionName = pNode->getChild(0); + } + else + { + pFunctionName = pNode; + } if ( !SQL_ISPUNCTUATION(pFunctionName,"{") ) { if ( SQL_ISRULEOR2(pNode,length_exp,char_value_fct) ) |