File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
{ ***************************************************************************
2
2
3
- Copyright (c) 2016-2019 Kike Pérez
3
+ Copyright (c) 2016-2020 Kike Pérez
4
4
5
5
Unit : Quick.Lists
6
6
Description : Generic Lists functions
7
7
Author : Kike Pérez
8
8
Version : 1.2
9
9
Created : 04/11/2018
10
- Modified : 11/05/2019
10
+ Modified : 12/03/2020
11
11
12
12
This file is part of QuickLib: https://github.com/exilon/QuickLib
13
13
@@ -257,11 +257,11 @@ function TSearchObjectList<T>.Get(const aFieldName: string; const aValue: string
257
257
begin
258
258
if aClassField = TClassField.cfField then
259
259
begin
260
- if TRTTI.GetFieldValue(TObject(val),aFieldName).AsString = aValue then Exit(val);
260
+ if (val <> nil ) and ( TRTTI.GetFieldValue(TObject(val),aFieldName).AsString = aValue) then Exit(val);
261
261
end
262
262
else
263
263
begin
264
- if GetStrProp(TObject(val),aFieldName) = aValue then Exit(val);
264
+ if (val <> nil ) and ( GetStrProp(TObject(val),aFieldName) = aValue) then Exit(val);
265
265
end ;
266
266
end ;
267
267
end ;
You can’t perform that action at this time.
0 commit comments