mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
LibGUI: Unregister AbstractView from model on destruction
It was possible to leave stale view pointers in the model after a view was destroyed while attached to a model.
This commit is contained in:
@@ -44,6 +44,8 @@ AbstractView::AbstractView()
|
||||
|
||||
AbstractView::~AbstractView()
|
||||
{
|
||||
if (m_model)
|
||||
m_model->unregister_view({}, *this);
|
||||
}
|
||||
|
||||
void AbstractView::set_model(RefPtr<Model> model)
|
||||
|
||||
Reference in New Issue
Block a user