Skip to content

Commit

Permalink
Add unique_ptr in nodeNotFromOgcFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Sep 13, 2018
1 parent b57b9d7 commit 5ccb167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsogcutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3398,14 +3398,14 @@ QgsExpressionNodeUnaryOperator *QgsOgcUtilsExpressionFromFilter::nodeNotFromOgcF
return nullptr;

QDomElement operandElem = element.firstChildElement();
QgsExpressionNode *operand = nodeFromOgcFilter( operandElem );
std::unique_ptr<QgsExpressionNode> operand( nodeFromOgcFilter( operandElem ) );
if ( !operand )
{
mErrorMessage = QObject::tr( "invalid operand for '%1' unary operator" ).arg( element.tagName() );
return nullptr;
}

return new QgsExpressionNodeUnaryOperator( QgsExpressionNodeUnaryOperator::uoNot, operand );
return new QgsExpressionNodeUnaryOperator( QgsExpressionNodeUnaryOperator::uoNot, operand.release() );
}

QgsExpressionNodeBinaryOperator *QgsOgcUtilsExpressionFromFilter::nodePropertyIsNullFromOgcFilter( const QDomElement &element )
Expand Down

0 comments on commit 5ccb167

Please sign in to comment.