fix crash in mapserver (introduced with 1215d0b01)

This commit is contained in:
Juergen E. Fischer 2014-01-07 11:03:02 +01:00
parent df48b05a94
commit dcd8bc5c69

View File

@ -270,7 +270,7 @@ void QgsPostgresConn::disconnect()
Q_ASSERT( !key.isNull() );
connections.remove( key );
if ( QThread::currentThread() == QApplication::instance()->thread() )
if ( !QApplication::instance() || QThread::currentThread() == QApplication::instance()->thread() )
deleteLater();
else
delete this;