Skip to content

Commit

Permalink
fix crash in spatialite srid selection on creation
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13392 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 26, 2010
1 parent 56c7575 commit ac96dcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/app/qgsnewspatialitelayerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ void QgsNewSpatialiteLayerDialog::on_pbnFindSRID_clicked()
if ( sridDlg->exec() )
{
// set the srid field to the selection
sridDlg->selectedSrid();
leSRID->setText( sridDlg->selectedSrid() );
sridDlg->accept();
}
Expand Down
5 changes: 4 additions & 1 deletion src/app/qgsspatialitesridsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ QgsSpatialiteSridsDialog::~QgsSpatialiteSridsDialog()
}
QString QgsSpatialiteSridsDialog::selectedSrid()
{
return twSrids->currentItem()->text( 0 );
if ( twSrids->currentItem() )
return twSrids->currentItem()->text( 0 );
else
return "-1";
}
bool QgsSpatialiteSridsDialog::load( QString dbName )
{
Expand Down

0 comments on commit ac96dcc

Please sign in to comment.