Browse Source

* fixed previous commit

git-svn-id: trunk@5843 -
florian 18 years ago
parent
commit
8e8c0832c6
2 changed files with 4 additions and 6 deletions
  1. 4 4
      rtl/inc/objpas.inc
  2. 0 2
      tests/webtbs/tw6868.pp

+ 4 - 4
rtl/inc/objpas.inc

@@ -51,8 +51,10 @@
     procedure fpc_intf_decr_ref(var i: pointer);[public,alias: 'FPC_INTF_DECR_REF']; compilerproc;
       begin
         if assigned(i) then
-          IUnknown(i)._Release;
-        i:=nil;
+          begin
+            IUnknown(i)._Release;
+            i:=nil;
+          end;
       end;
 
     { local declaration for intf_decr_ref for local access }
@@ -85,8 +87,6 @@
            begin
              if IUnknown(S).QueryInterface(iid,tmp)<>S_OK then
                handleerror(219);  
-             if assigned(tmp) then             
-               IUnknown(tmp)._AddRef;
              if assigned(D) then
                IUnknown(D)._Release;
              D:=tmp;

+ 0 - 2
tests/webtbs/tw6868.pp

@@ -16,8 +16,6 @@ end;
 
 procedure FreeHelpSystem;
 begin
-  if HelpManager <> nil then
-    HelpManager._Release;
   HelpManager := nil;
 end;