coverity#983369 Dereference before null check

Change-Id: Ifadcbe32aa64a9653f4e8dd8742dd3c5da22facd
This commit is contained in:
Caolán McNamara
2014-04-10 20:21:48 +01:00
parent af110680a5
commit 97865e0a72

View File

@@ -1212,11 +1212,11 @@ namespace
const ::connectivity::OSQLParseNode* pNode, const ::connectivity::OSQLParseNode* pNode,
sal_uInt16& rLevel ) sal_uInt16& rLevel )
{ {
if (!SQL_ISRULE(pNode, select_statement)) if (!pNode || !SQL_ISRULE(pNode, select_statement))
return eNoSelectStatement; return eNoSelectStatement;
// nyi: more checking for the correct structure! // nyi: more checking for the correct structure!
pNode = pNode ? pNode->getChild(3)->getChild(1) : NULL; pNode = pNode->getChild(3)->getChild(1);
// no where clause found // no where clause found
if (!pNode || pNode->isLeaf()) if (!pNode || pNode->isLeaf())
return eOk; return eOk;