Browse Source

* Cursor can be nil, patch from Mattias Gaertner

git-svn-id: trunk@48702 -
michael 4 years ago
parent
commit
2da4113310
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-db/src/sqldb/sqldb.pp

+ 1 - 1
packages/fcl-db/src/sqldb/sqldb.pp

@@ -3137,7 +3137,7 @@ begin
       UpdateServerIndexDefs;
 
     FStatement.Execute;
-    if not Cursor.FSelectable then
+    if (Cursor=nil) or (not Cursor.FSelectable) then
       DatabaseError(SErrNoSelectStatement,Self);
 
     // InternalInitFieldDef is only called after a prepare. i.e. not twice if