summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-23 16:39:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-23 17:01:04 +0000
commit09c749cc5787be8d17ac5ddf0bc9aa0aead92d6b (patch)
tree0a980e20222461e7b3b6fc3bab5dcad092a0936c /connectivity
parent691da8335641e531a648c7ce09563d60999622fc (diff)
coverity#440711 Explicit null dereferenced
Change-Id: I794ac29dc81b1d42b959135277284de1f8c33ccf
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqliterator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 06b07cac2922..ae9fff2b2202 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1249,9 +1249,10 @@ bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSele
return false;
}
- if (! SQL_ISRULE(pWhereClause,where_clause)) {
+ if (!pWhereClause || !SQL_ISRULE(pWhereClause,where_clause))
+ {
// The WHERE clause is optional most of the time; which means it could be a "optional_where_clause".
- OSL_ENSURE(SQL_ISRULE(pWhereClause,opt_where_clause),"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pWhereClause && SQL_ISRULE(pWhereClause,opt_where_clause),"OSQLParseTreeIterator: error in parse tree!");
return false;
}