Skip to content
Permalink
Browse files

Fix for segfault

  • Loading branch information
elpaso committed Jan 7, 2014
1 parent bd77ecc commit f8247fabdaf1f194cd4356336768b690a005bd9b
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/providers/postgres/qgspostgresconn.cpp
@@ -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.
You can’t perform that action at this time.