From 2c0eb0cebdbdced719524c0b78ae9c4eb95dbab5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 15 Nov 2026 08:44:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Deduplicate=20block=20event=20re?= =?UTF-8?q?gistrations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Registering the same change handler twice fired destroy and change notifications twice for one block. --- UOLib/UMulBlock.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UOLib/UMulBlock.pas b/UOLib/UMulBlock.pas index 399fc42..6eefef4 100644 --- a/UOLib/UMulBlock.pas +++ b/UOLib/UMulBlock.pas @@ -101,7 +101,7 @@ procedure TMulBlockEventHandler.RegisterEvent(AEvent: TMulBlockChanged); var eventInfo: PMethod; begin - //UnregisterEvent(AEvent); + UnregisterEvent(AEvent); New(eventInfo); eventInfo^.Code := TMethod(AEvent).Code; eventInfo^.Data := TMethod(AEvent).Data;