浏览代码

* Patch from Luxa Olivetti, fix for issue #33737

Michaël Van Canneyt 3 年之前
父节点
当前提交
27f8f077d5
共有 1 个文件被更改,包括 5 次插入0 次删除
  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