File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Orm/Xtensive.Orm/Orm/Internals Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1- // Copyright (C) 2012-2020 Xtensive LLC.
1+ // Copyright (C) 2012-2021 Xtensive LLC.
22// This code is distributed under MIT license terms.
33// See the License.txt file in the project root for more information.
44// Created by: Denis Krjuchkov
@@ -156,6 +156,9 @@ private void AllocateParameterAndReplacer()
156156 queryParameter = ( Parameter ) System . Activator . CreateInstance ( parameterType , "pClosure" ) ;
157157 queryParameterReplacer = new ExtendedExpressionReplacer ( expression => {
158158 if ( expression . NodeType == ExpressionType . Constant ) {
159+ if ( ( expression as ConstantExpression ) . Value == null ) {
160+ return null ;
161+ }
159162 if ( expression . Type . IsClosure ( ) ) {
160163 if ( expression . Type == closureType ) {
161164 return Expression . MakeMemberAccess ( Expression . Constant ( queryParameter , parameterType ) , valueMemberInfo ) ;
You can’t perform that action at this time.
0 commit comments