Skip to content

Commit 399a1bf

Browse files
committedJun 4, 2019
Fix another crash when transforms cannot be created
1 parent 66533a9 commit 399a1bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/core/qgscoordinatetransform_p.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,13 @@ ProjData QgsCoordinateTransformPrivate::threadLocalProjData()
455455
}
456456

457457
// transform may have either the source or destination CRS using swapped axis order. For QGIS, we ALWAYS need regular x/y axis order
458-
transform.reset( proj_normalize_for_visualization( context, transform.get() ) );
458+
if ( transform )
459+
transform.reset( proj_normalize_for_visualization( context, transform.get() ) );
459460
if ( !transform )
460461
{
461462
const QString err = QObject::tr( "Cannot normalize transform between %1 and %2" ).arg( mSourceCRS.authid() )
462463
.arg( mDestCRS.authid() );
464+
QgsMessageLog::logMessage( err, QString(), Qgis::Critical );
463465
}
464466
}
465467
proj_list_destroy( ops );

0 commit comments

Comments
 (0)