Skip to content
Permalink
Browse files
Fix for segfault
  • Loading branch information
elpaso committed Jan 7, 2014
1 parent bd77ecc commit f8247fa
Showing 1 changed file with 4 additions and 3 deletions.
@@ -270,10 +270,11 @@ void QgsPostgresConn::disconnect()
Q_ASSERT( !key.isNull() );
connections.remove( key );

if ( QThread::currentThread() == QApplication::instance()->thread() )
deleteLater();
if ( !QApplication::instance() || QThread::currentThread() == QApplication::instance()->thread() )
deleteLater();
else
delete this;
delete this;

}

/* private */

0 comments on commit f8247fa

Please sign in to comment.