Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash when QgsDatumTransformStore::transformation returns 0
Simply fix to prevent crash if QgsDatumTransformStore::transformation returns 0. Works for me but has not been further tested!
  • Loading branch information
christianurich committed Jun 6, 2014
1 parent 8c513f9 commit 319694f
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 319694f

Please sign in to comment.