Skip to content
Permalink
Browse files

fix connection pool crash without qapplication (fixes #13166)

  • Loading branch information
jef-n committed Jul 28, 2015
1 parent 93e2c5a commit f528cb80df7391435aebf47ffb73e4f4081c0ab7
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/qgsconnectionpool.h
@@ -31,7 +31,7 @@
#define CONN_POOL_EXPIRATION_TIME 60 // in seconds


/*! Template that stores data related to one server.
/** Template that stores data related to one server.
*
* It is assumed that following functions exist:
* - void qgsConnectionPool_ConnectionCreate(QString name, T& c) ... create a new connection
@@ -164,7 +164,8 @@ class QgsConnectionPoolGroup
QObject::connect( expirationTimer, SIGNAL( timeout() ), parent, SLOT( handleConnectionExpired() ) );

// just to make sure the object belongs to main thread and thus will get events
parent->moveToThread( qApp->thread() );
if ( qApp )
parent->moveToThread( qApp->thread() );
}

void onConnectionExpired()

0 comments on commit f528cb8

Please sign in to comment.
You can’t perform that action at this time.