Skip to content

Commit

Permalink
Properly set invalid topology layer as invalid
Browse files Browse the repository at this point in the history
Fixes #13781 (crash)
  • Loading branch information
Sandro Santilli committed Nov 6, 2015
1 parent c0156fc commit 54cf972
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,15 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
return;
}

// NOTE: mValid would be true after true return from
// getGeometryDetails, see http://hub.qgis.org/issues/13781

if ( mSpatialColType == sctTopoGeometry )
{
if ( !getTopoLayerInfo() ) // gets topology name and layer id
{
QgsMessageLog::logMessage( tr( "invalid PostgreSQL topology layer" ), tr( "PostGIS" ) );
mValid = false;
disconnectDb();
return;
}
Expand Down

0 comments on commit 54cf972

Please sign in to comment.