summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2016-06-02 11:52:42 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2016-06-02 11:53:23 +0200
commit09224f23168786fbe28641a87cbffddcbed6e31b (patch)
tree37ec2bdf2b333998a218d3ba926de179ba79e975 /connectivity
parenta21d34941c01622a479523d9eb2ab4086ff14ca0 (diff)
don't detach from database if we are not attached
this leads to a cascade of uncaught/unexpected exception and thus abort in debug build Change-Id: If417d2fd2037379e3006f98bc046713729ea4648
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 4f825709604c..979c677cf946 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -773,9 +773,12 @@ void Connection::disposing()
isc_rollback_transaction(status, &m_aTransactionHandle);
}
- if (isc_detach_database(status, &m_aDBHandle))
+ if (m_aDBHandle != 0)
{
- evaluateStatusVector(status, "isc_detach_database", *this);
+ if (isc_detach_database(status, &m_aDBHandle))
+ {
+ evaluateStatusVector(status, "isc_detach_database", *this);
+ }
}
// TODO: write to storage again?