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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user