dbaccess/source/ui/querydesign/QueryDesignView.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 718e2912d031280a52991157ffc024c5516eec32 Author: Julien Nabet <serval2...@yahoo.fr> Date: Sat Oct 22 11:26:20 2011 +0200 Fix fdo#38286. Perhaps it could be simplified Signed-off-by: Petr Mladek <pmla...@suse.cz> diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index be56580..a94ead0 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -3193,7 +3193,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) ) _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits