Skip to content
Permalink
Browse files

Properly set invalid topology layer as invalid

Fixes #13781 (crash)
  • Loading branch information
Sandro Santilli
Sandro Santilli committed Nov 6, 2015
1 parent c0156fc commit 54cf972ac2334451e69d2171cc4f3e42da3880df
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/providers/postgres/qgspostgresprovider.cpp
@@ -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;
}

0 comments on commit 54cf972

Please sign in to comment.
You can’t perform that action at this time.