Skip to content

Commit dcd8bc5

Browse files
committed
fix crash in mapserver (introduced with 1215d0b)
1 parent df48b05 commit dcd8bc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/postgres/qgspostgresconn.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ void QgsPostgresConn::disconnect()
270270
Q_ASSERT( !key.isNull() );
271271
connections.remove( key );
272272

273-
if ( QThread::currentThread() == QApplication::instance()->thread() )
273+
if ( !QApplication::instance() || QThread::currentThread() == QApplication::instance()->thread() )
274274
deleteLater();
275275
else
276276
delete this;

0 commit comments

Comments
 (0)