Skip to content

Commit

Permalink
Avoid crs definition errors when closing options dialog
Browse files Browse the repository at this point in the history
Fixes #47014
  • Loading branch information
nyalldawson committed Jan 30, 2022
1 parent e1b8abd commit f8d407f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/options/qgscustomprojectionoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,12 @@ bool QgsCustomProjectionOptionsWidget::isValid()
QgsCoordinateReferenceSystem crs;
for ( const Definition &def : std::as_const( mDefinitions ) )
{
if ( !def.wkt.isEmpty() )
if ( !def.wkt.trimmed().isEmpty() )
crs.createFromWkt( def.wkt );
else
else if ( !def.proj.trimmed().isEmpty() )
crs.createFromProj( def.proj );
else
continue;

if ( !crs.isValid() )
{
Expand Down

0 comments on commit f8d407f

Please sign in to comment.