Skip to content
Permalink
Browse files

apply #4685

  • Loading branch information
jef-n committed Dec 20, 2011
1 parent bd1300a commit ac93c0c30f88d3987ea55313671709871aa35c65
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresprovider.cpp
@@ -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 )
{
@@ -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 ) );
}

0 comments on commit ac93c0c

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