blish-hud / Blish-HUD

A Guild Wars 2 overlay with extreme extensibility through compiled modules.
https://blishhud.com
MIT License
320 stars 59 forks source link

Disposing Controls twice freezes BlishHud #886

Open flakysalt opened 1 year ago

flakysalt commented 1 year ago

Adding a Control type like a button to a view multiple times crashes BlishHud when the View is being disposed of.

  1. Add a Control Type to a View twice (in my case, a button to a settings view)
  2. Set the buttons parent via the parent field
  3. add the button via .AddChild(button) again
  4. Observe BlishHud Freezing upon Disabling the Module

This is definitely a user error, but I would expect adding a control twice to be caught beforehand or an exception is thrown when the element is to be disposed of again.