Skip to content

Commit

Permalink
apply #4685
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Dec 20, 2011
1 parent bd1300a commit ac93c0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4029,7 +4029,7 @@ bool QgsPostgresProvider::getGeometryDetails()
QgsDebugMsg( "Getting geometry column: " + sql );
result = connectionRO->PQexec( sql );

QgsDebugMsg( "geometry column query returned " + QString::number( PQntuples( result ) ) );
QgsDebugMsg( QString( "geometry column query returned %1 rows" ).arg( PQntuples( result ) ) );

if ( PQntuples( result ) > 0 )
{
Expand Down Expand Up @@ -4117,7 +4117,7 @@ bool QgsPostgresProvider::getGeometryDetails()

result = connectionRO->PQexec( sql );

if ( PQntuples( result ) == 1 )
if ( PQntuples( result ) == 1 && !PQgetisnull( result, 0, 0 ) )
{
fType = QString::fromUtf8( PQgetvalue( result, 0, 0 ) );
}
Expand Down

0 comments on commit ac93c0c

Please sign in to comment.