Skip to content
Permalink
Browse files
Merge pull request #1429 from christianurich/QgsDatumTransformStore_t…
…ransformation_0

Fix crash when QgsDatumTransformStore::transformation returns 0
  • Loading branch information
wonder-sk committed Jun 6, 2014
2 parents 563f521 + 319694f commit 63af881a385b89dfb18e85ee842e2a7e29bd8599
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/core/qgsmaprendererjob.cpp
@@ -409,7 +409,8 @@ void QgsMapRendererJob::drawOldLabeling( const QgsMapSettings& settings, QgsRend
if ( settings.hasCrsTransformEnabled() )
{
ct = settings.layerTransfrom( ml );
reprojectToLayerExtent( ct, ml->crs().geographicFlag(), r1, r2 );
if ( ct )
reprojectToLayerExtent( ct, ml->crs().geographicFlag(), r1, r2 );
}

renderContext.setCoordinateTransform( ct );
@@ -572,7 +573,10 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
if ( mSettings.hasCrsTransformEnabled() )
{
ct = mSettings.layerTransfrom( ml );
reprojectToLayerExtent( ct, ml->crs().geographicFlag(), r1, r2 );
if ( ct )
{
reprojectToLayerExtent( ct, ml->crs().geographicFlag(), r1, r2 );
}
QgsDebugMsg( "extent: " + r1.toString() );
if ( !r1.isFinite() || !r2.isFinite() )
{

0 comments on commit 63af881

Please sign in to comment.