We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd77ecc commit f8247faCopy full SHA for f8247fa
1 file changed
src/providers/postgres/qgspostgresconn.cpp
@@ -270,10 +270,11 @@ void QgsPostgresConn::disconnect()
270
Q_ASSERT( !key.isNull() );
271
connections.remove( key );
272
273
- if ( QThread::currentThread() == QApplication::instance()->thread() )
274
- deleteLater();
+ if ( !QApplication::instance() || QThread::currentThread() == QApplication::instance()->thread() )
+ deleteLater();
275
else
276
- delete this;
+ delete this;
277
+
278
}
279
280
/* private */
0 commit comments