From 4a832797c0559fb00346f85d23a84fc55622afb3 Mon Sep 17 00:00:00 2001 From: Khosrow Afroozeh Date: Wed, 24 Jan 2024 22:58:07 +0100 Subject: [PATCH] Fix nil pointer deref in setQuery --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index c7c15746..6c947ecf 100644 --- a/command.go +++ b/command.go @@ -1535,7 +1535,7 @@ func (cmd *baseCommand) setQuery(policy *QueryPolicy, wpolicy *WritePolicy, stat var ctxSize int filterExpression := policy.FilterExpression - if filterExpression == nil { + if filterExpression == nil && wpolicy != nil { filterExpression = wpolicy.FilterExpression }