Browse Source

* Patch from Luxa Olivetti, fix for issue #33737

Michaël Van Canneyt 2 years ago
parent
commit
27f8f077d5
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/fcl-db/src/sqldb/postgres/pqconnection.pp

+ 5 - 0
packages/fcl-db/src/sqldb/postgres/pqconnection.pp

@@ -987,6 +987,11 @@ begin
     begin
     PQclear(res);
     res:=nil;
+    if ForcedClose then
+    begin
+      FPrepared := False;
+      exit;
+    end;
     if FPrepared then
       begin
       if assigned(tr) and (PQtransactionStatus(tr.PGConn) <> PQTRANS_INERROR) then