Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #1429 from christianurich/QgsDatumTransformStore_t…
Browse files Browse the repository at this point in the history
…ransformation_0

Fix crash when QgsDatumTransformStore::transformation returns 0
  • Loading branch information
wonder-sk committed Jun 6, 2014
2 parents 563f521 + 319694f commit 63af881
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/qgsmaprendererjob.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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() )
{
Expand Down

0 comments on commit 63af881

Please sign in to comment.