Skip to content
Permalink
Browse files

Fix regression of previous commit in ogr_multi_defer.png and ogr_attr…

…filter.png (#4974, #4999)
  • Loading branch information
rouault committed Sep 20, 2014
1 parent 6902603 commit 6a4d00ed0b40cfc6e17356df065ba8b5c43b1b64
Showing with 8 additions and 2 deletions.
  1. +8 −2 mapogr.cpp
@@ -1513,8 +1513,9 @@ static char* msOGRTranslateMsExpressionToOGRSQL(layerObj* layer,

if (layer->debug >= MS_DEBUGLEVEL_VVV)
msDebug("msOGRTranslateMsExpressionToOGRSQL: filter can be evaluated completely on OGR side\n");
msFree( layer->filter.string );
layer->filter.string = NULL;

msFree( layer->filter.native_string );
layer->filter.native_string = msStrdup(msSQLExpression);
}

if( sBBOXValid )
@@ -1555,6 +1556,11 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect,
/* In case we have an odd filter combining both a OGR filter and MapServer */
/* filter, then separate things */
msOGRSplitFilter(layer, &pszOGRFilter, &pszMSFilter);
if( pszOGRFilter != NULL && pszMSFilter == NULL )
{
msFree(layer->filter.native_string);
layer->filter.native_string = msStrdup(pszOGRFilter);
}

/* Apply sortBy */
if( layer->sortBy.nProperties > 0 ) {

0 comments on commit 6a4d00e

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