소스 검색

* Only free event if it was actually created

Michaël Van Canneyt 1 년 전
부모
커밋
cb7a8dfea7
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/fcl-base/src/syncobjs.pp

+ 2 - 1
packages/fcl-base/src/syncobjs.pp

@@ -412,7 +412,8 @@ end;
 
 destructor THandleObject.Destroy;
 begin
-  BasicEventDestroy(Handle);
+  if (Handle<>Nil) then
+    BasicEventDestroy(Handle);
 end;
 
 constructor TEventObject.Create(EventAttributes : PSecurityAttributes;