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/qgis@13392 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 26, 2010
1 parent 9875255 commit 1ba0e0e
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
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
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 1ba0e0e

Please sign in to comment.