Skip to content
Permalink
Browse files

Fix crash when selecting invalid CRS in new spatialite dialog

  • Loading branch information
m-kuhn committed Jun 7, 2013
1 parent 73e9c31 commit 63617bab9caa8d30c5c6e0fef850cb7ac6d4b77c
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/app/qgsnewspatialitelayerdialog.cpp
@@ -251,8 +251,12 @@ void QgsNewSpatialiteLayerDialog::on_pbnFindSRID_clicked()
QgsCoordinateReferenceSystem srs;
srs.createFromOgcWmsCrs( mySelector->selectedAuthId() );
bool ok;
mCrsId = srs.authid().split( ':' ).at( 1 ).toInt( &ok );
leSRID->setText( srs.authid() + " - " + srs.description() );
int crsId = srs.authid().split( ':' ).value( 1, QString::number( mCrsId ) ).toInt( &ok );
if ( crsId != mCrsId )
{
mCrsId = crsId;
leSRID->setText( srs.authid() + " - " + srs.description() );
}
}
delete mySelector;
}

0 comments on commit 63617ba

Please sign in to comment.
You can’t perform that action at this time.