Skip to content
Permalink
Browse files
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 319694fc1bca900143eae8ff39b1dd91e0a33df3
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 319694f

Please sign in to comment.