[Libreoffice-commits] core.git: connectivity/source

Julien Nabet serval2412 at yahoo.fr
Sat Jan 6 18:53:41 UTC 2018


 connectivity/source/drivers/odbc/OResultSet.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 89e354eff9d99d05461e2892fb1af56d186b8653
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Jan 6 15:36:53 2018 +0100

    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 at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

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()


More information about the Libreoffice-commits mailing list