summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-27 11:55:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-27 16:48:41 +0200
commitff74bd33e5e3ef7514bb405e353acca25399f20f (patch)
tree289d6952e19d335f9eee6d8d77097eedf62064cf /connectivity
parent136077b40cdabab83aec6833bf3895d4305d30a3 (diff)
coverity#1438783 Unchecked return value
Change-Id: Ice56d317087dd24d2eef27f2ace5fdf9f4da946d Reviewed-on: https://gerrit.libreoffice.org/59654 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
index 742b3c4f26f5..106ad775e7e5 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
@@ -63,7 +63,9 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive(sal_Int32 column)
Reference<XResultSet> rs = stmt->executeQuery(sql.makeStringAndClear());
Reference<XRow> xRow(rs, UNO_QUERY_THROW);
- rs->next(); // fetch first and only row
+ if (!rs->next()) // fetch first and only row
+ return false;
+
rtl::OUString sColName = xRow->getString(1); // first column is Collation name
return !sColName.isEmpty() && !sColName.endsWith("_ci");