Browse Source

* Patch from Luxa Olivetti, fix for issue #33737

(cherry picked from commit 27f8f077d53b0bcea6111023f23c40b0fa54bcc3)
Michaël Van Canneyt 3 years ago
parent
commit
69ffa43ccf
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