Skip to content

Commit

Permalink
apply patch for #3347 from kcube
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15175 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 15, 2011
1 parent 237dc0a commit a8fb1b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/qgssearchquerybuilder.cpp
Expand Up @@ -203,7 +203,7 @@ long QgsSearchQueryBuilder::countRecords( QString searchString )
return -1;

QgsSearchTreeNode* searchTree = search.tree();
if ( searchTree == NULL )
if ( !searchTree )
{
// entered empty search string
return mLayer->featureCount();
Expand Down Expand Up @@ -235,6 +235,12 @@ long QgsSearchQueryBuilder::countRecords( QString searchString )

QApplication::restoreOverrideCursor();

if ( searchTree->hasError() )
{
QMessageBox::critical( this, tr( "Error during search" ), searchTree->errorMsg() );
return -1;
}

return count;
}

Expand Down

0 comments on commit a8fb1b4

Please sign in to comment.