Browse Source

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

git-svn-id: trunk@19619 -
blikblum 13 years ago
parent
commit
a797a3a38a
1 changed files with 1 additions and 1 deletions
  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