Skip to content

Commit

Permalink
Fix some crashes with crses with no proj string capability
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 4, 2019
1 parent fb4a0c1 commit 66533a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsprojectionselectiontreewidget.cpp
Expand Up @@ -395,8 +395,6 @@ QString QgsProjectionSelectionTreeWidget::selectedProj4String()
// close the database
sqlite3_close( database );

Q_ASSERT( !projString.isEmpty() );

return projString;
}

Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit 66533a9

Please sign in to comment.