From 0f5116d0d6bbf9200c73eb373f55c84d293a739a Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Fri, 16 Sep 2022 16:13:49 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20=E8=A1=A8=E8=BE=BE?= =?UTF-8?q?=E5=BC=8F=E6=A0=91=E8=A7=A3=E6=9E=90=E4=B8=BA=20NULL=20?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/Internal/CommonExpression.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FreeSql/Internal/CommonExpression.cs b/FreeSql/Internal/CommonExpression.cs index 073aa1a1..50c67be3 100644 --- a/FreeSql/Internal/CommonExpression.cs +++ b/FreeSql/Internal/CommonExpression.cs @@ -1724,6 +1724,7 @@ namespace FreeSql.Internal } while (expStack.Any()) { + if (firstValue == null) throw new Exception(CoreStrings.Cannot_Be_NULL_Name(exp)); var expStackItem = expStack.Pop() as MemberExpression; if (expStackItem.Member.MemberType == MemberTypes.Property) firstValue = ((PropertyInfo)expStackItem.Member).GetValue(firstValue, null); @@ -2077,6 +2078,7 @@ namespace FreeSql.Internal } while (expStack.Any()) { + if (firstValue == null) throw new Exception(CoreStrings.Cannot_Be_NULL_Name(exp)); var expStackItem = expStack.Pop() as MemberExpression; if (expStackItem.Member.MemberType == MemberTypes.Property) firstValue = ((PropertyInfo)expStackItem.Member).GetValue(firstValue, null);