Skip to content

Commit

Permalink
Fix crash when selecting invalid CRS in new spatialite dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 7, 2013
1 parent 73e9c31 commit 63617ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/qgsnewspatialitelayerdialog.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 63617ba

Please sign in to comment.