From 97865e0a72272d5be8c65d636eafdba04736a58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 10 Apr 2014 20:21:48 +0100 Subject: [PATCH] coverity#983369 Dereference before null check Change-Id: Ifadcbe32aa64a9653f4e8dd8742dd3c5da22facd --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 2f105d74603f..c31239990d9c 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1212,11 +1212,11 @@ namespace const ::connectivity::OSQLParseNode* pNode, sal_uInt16& rLevel ) { - if (!SQL_ISRULE(pNode, select_statement)) + if (!pNode || !SQL_ISRULE(pNode, select_statement)) return eNoSelectStatement; // 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 if (!pNode || pNode->isLeaf()) return eOk;