Skip to content

Commit ac96dcc

Browse files
author
jef
committedApr 26, 2010
fix crash in spatialite srid selection on creation
git-svn-id: http://svn.osgeo.org/qgis/trunk@13392 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 56c7575 commit ac96dcc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/app/qgsnewspatialitelayerdialog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ void QgsNewSpatialiteLayerDialog::on_pbnFindSRID_clicked()
181181
if ( sridDlg->exec() )
182182
{
183183
// set the srid field to the selection
184-
sridDlg->selectedSrid();
185184
leSRID->setText( sridDlg->selectedSrid() );
186185
sridDlg->accept();
187186
}

‎src/app/qgsspatialitesridsdialog.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ QgsSpatialiteSridsDialog::~QgsSpatialiteSridsDialog()
3333
}
3434
QString QgsSpatialiteSridsDialog::selectedSrid()
3535
{
36-
return twSrids->currentItem()->text( 0 );
36+
if ( twSrids->currentItem() )
37+
return twSrids->currentItem()->text( 0 );
38+
else
39+
return "-1";
3740
}
3841
bool QgsSpatialiteSridsDialog::load( QString dbName )
3942
{

0 commit comments

Comments
 (0)
Please sign in to comment.