Skip to content

Commit 54cf972

Browse files
author
Sandro Santilli
committedNov 6, 2015
Properly set invalid topology layer as invalid
Fixes #13781 (crash)
1 parent c0156fc commit 54cf972

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,15 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
128128
return;
129129
}
130130

131+
// NOTE: mValid would be true after true return from
132+
// getGeometryDetails, see http://hub.qgis.org/issues/13781
133+
131134
if ( mSpatialColType == sctTopoGeometry )
132135
{
133136
if ( !getTopoLayerInfo() ) // gets topology name and layer id
134137
{
135138
QgsMessageLog::logMessage( tr( "invalid PostgreSQL topology layer" ), tr( "PostGIS" ) );
139+
mValid = false;
136140
disconnectDb();
137141
return;
138142
}

0 commit comments

Comments
 (0)
Please sign in to comment.