Skip to content
Permalink
Browse files
Fix crash in standalone apps when no QgsApplication available
  • Loading branch information
nyalldawson committed Dec 5, 2017
1 parent 4671acb commit 9d0b0f2
Showing 1 changed file with 1 addition and 1 deletion.
@@ -614,7 +614,7 @@ static void _drawDebugRect( QPainter &p, const QRectF &rect, const QColor &color

QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, int pixelHeight, QgsRasterBlockFeedback *feedback )
{
if ( QgsApplication::instance()->thread() != QThread::currentThread() )
if ( qApp && qApp->thread() != QThread::currentThread() )
{
QgsDebugMsg( "Trying to draw a WMS image on the main thread. Stop it!" );
}

0 comments on commit 9d0b0f2

Please sign in to comment.