Explorar o código

sqliteds: check FMasterLink.Active before FMasterLink.Dataset to avoid crash when FMasterLink.Dataset = nil

git-svn-id: trunk@19619 -
blikblum %!s(int64=13) %!d(string=hai) anos
pai
achega
a797a3a38a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/fcl-db/src/sqlite/customsqliteds.pas

+ 1 - 1
packages/fcl-db/src/sqlite/customsqliteds.pas

@@ -1436,7 +1436,7 @@ var
   AFilter: String;
   i: Integer;
 begin
-  if (FMasterLink.Dataset.RecordCount = 0) or not FMasterLink.Active then //Retrieve all data
+  if not FMasterLink.Active or (FMasterLink.Dataset.RecordCount = 0) then //Retrieve all data
     FEffectiveSQL := FSqlFilterTemplate
   else
   begin