mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
Portal cached raw scroll area pointers and only skipped widgets whose state was UI_WIDGET_STATE_DELETED. ui_widget_destroy() frees immediately and never sets that state, so replacing the docs layout (locale switch) left dropdown portals pointing at a freed ScrollArea. Destroying the portal then called ui_widget_off() on freed memory. Register a destroy listener on every bound scroll parent, clear the matching slot, and skip cleared slots while handling scroll events.