Fix some crashes with crses with no proj string capability

This commit is contained in:
Nyall Dawson 2019-06-04 10:32:59 +10:00
parent fb4a0c1b85
commit 66533a9d8f

View File

@ -395,8 +395,6 @@ QString QgsProjectionSelectionTreeWidget::selectedProj4String()
// close the database
sqlite3_close( database );
Q_ASSERT( !projString.isEmpty() );
return projString;
}
@ -700,6 +698,9 @@ void QgsProjectionSelectionTreeWidget::loadCrsList( QSet<QString> *crsFilter )
// This is a projected srs
QTreeWidgetItem *node = nullptr;
QString srsType = QString::fromUtf8( ( char * )sqlite3_column_text( stmt, 4 ) );
if ( srsType.isEmpty() )
srsType = tr( "Other" );
// Find the node for this type and add the projection to it
// If the node doesn't exist, create it
if ( srsType == previousSrsType )