Skip to content
Permalink
Browse files

[bugfix][postgresql] Fix crashes on featureCount()

Fixes #17388

Backported from master fe56531
  • Loading branch information
elpaso committed Nov 10, 2017
1 parent f80a705 commit 269038efb43dd9c0421c1e52d502fb08387758ae
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/providers/postgres/qgspostgresprovider.cpp
@@ -2923,6 +2923,12 @@ long QgsPostgresProvider::featureCount() const
if ( featuresCounted >= 0 )
return featuresCounted;

// See: https://issues.qgis.org/issues/17388 - QGIS crashes on featureCount())
if ( ! connectionRO() )
{
return 0;
}

// get total number of features
QString sql;

0 comments on commit 269038e

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