Fix null pointer crash

This commit is contained in:
Magnus Norddahl 2024-01-29 23:10:42 +01:00 committed by Rachael Alexanderson
parent 0b54e7e91d
commit 989123b5f8

View file

@ -563,8 +563,10 @@ void Widget::OnWindowMouseMove(const Point& pos)
do do
{ {
widget->OnMouseMove(widget->MapFrom(this, pos)); widget->OnMouseMove(widget->MapFrom(this, pos));
if (widget == this)
break;
widget = widget->Parent(); widget = widget->Parent();
} while (widget != this); } while (widget);
} }
} }