diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-01-06 15:36:53 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-01-06 19:53:12 +0100 |
commit | 89e354eff9d99d05461e2892fb1af56d186b8653 (patch) | |
tree | 1c35816e6aafe3cd6e6c1ec2081224fdae631493 /connectivity | |
parent | a5850ecec9ba72ab671154b351db6a423db83f76 (diff) |
tdf#114495: fix crash in odbc resultset dtr
See bt https://bugs.documentfoundation.org/attachment.cgi?id=138913
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=12d5e57dcac22c288ef23075b82e3e3e87929912
Change-Id: Ic079b87370207a1e51d747e250caea2bfcbc8c17
Reviewed-on: https://gerrit.libreoffice.org/47496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/odbc/OResultSet.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index 8c8ccc7e28fb..25f05f1b9735 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -164,7 +164,8 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet::~OResultSet() { - setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, nullptr); + if (m_xStatement) + setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, nullptr); } void OResultSet::construct() |