Check window validity in wxNonOwnedWindow::Update() in wxMac too

This was already done in the other functions, but not this one,
resulting in a crash if it was called for an object with null m_nowpeer
(e.g. before it's created or when it's not a real wxNonOwnedWindow
object as when it's a subobject of wxTDIChildFrame).

See #18423.
This commit is contained in:
Vadim Zeitlin
2019-06-26 18:37:31 +02:00
parent 7f768eda2d
commit 6ee5184171

View File

@@ -481,6 +481,9 @@ void wxNonOwnedWindow::WindowWasPainted()
void wxNonOwnedWindow::Update()
{
if ( m_nowpeer == NULL )
return;
if ( clock() - s_lastFlush > CLOCKS_PER_SEC / 30 )
{
s_lastFlush = clock();