Skip to content
Permalink
Browse files

Fix crash

  • Loading branch information
nyalldawson committed Jan 10, 2019
1 parent b4d764a commit e8b057b4966bbf551f7ecccf63f2e997fd0aef03
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgslegendrenderer.cpp
@@ -380,7 +380,7 @@ QSizeF QgsLegendRenderer::drawTitleInternal( QgsRenderContext *context, QPainter
QStringList lines = mSettings.splitStringForWrapping( mSettings.title() );
double y = point.y();

if ( context )
if ( context && context->painter() )
{
context->painter()->setPen( mSettings.fontColor() );
}
@@ -420,7 +420,7 @@ QSizeF QgsLegendRenderer::drawTitleInternal( QgsRenderContext *context, QPainter

QRectF r( textBoxLeft, y, textBoxWidth, height );

if ( context->painter() )
if ( context && context->painter() )
{
mSettings.drawText( context->painter(), r, *titlePart, titleFont, halignment, Qt::AlignVCenter, Qt::TextDontClip );
}

0 comments on commit e8b057b

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