From 7f010191f5c990b98771e8c8f4f0d2ae2141dd2b Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 7 Jul 2019 18:39:55 +0000 Subject: [PATCH] * Check that currentindex is assigned --- packages/fcl-db/jsondataset.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/fcl-db/jsondataset.pas b/packages/fcl-db/jsondataset.pas index 5de649f..9543abc 100644 --- a/packages/fcl-db/jsondataset.pas +++ b/packages/fcl-db/jsondataset.pas @@ -1339,8 +1339,12 @@ begin end; function TBaseJSONDataSet.GetRecordCount: Integer; + begin - Result:=FCurrentIndex.Count; + if Assigned(FCurrentIndex) then + Result:=FCurrentIndex.Count + else + Result:=0; end; function TBaseJSONDataSet.GetRecordSize: Word;