Fix possible crash after 3217a4e8a2
3217a4e8a2
(Fix best size for windows which are hidden when TLW is shown
with GTK3, 2021-04-30) did not account for possibility that window needing
revalidated best size is also the TLW.
See #16088
This commit is contained in:
@@ -5871,17 +5871,20 @@ void wxWindowGTK::GTKSizeRevalidate()
|
||||
wxWindow* w = win;
|
||||
while (w && w->IsShown() && !w->IsTopLevel())
|
||||
w = w->GetParent();
|
||||
// If win is a child of this
|
||||
if (w == this)
|
||||
{
|
||||
win->InvalidateBestSize();
|
||||
gs_sizeRevalidateList = g_list_delete_link(gs_sizeRevalidateList, p);
|
||||
do
|
||||
// Mark parents as needing size event
|
||||
m_needSizeEvent = true;
|
||||
while (win != this)
|
||||
{
|
||||
win = win->m_parent;
|
||||
if (win->m_needSizeEvent)
|
||||
break;
|
||||
win->m_needSizeEvent = true;
|
||||
} while (win != this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user