From d4d799e9ea2ff317ac8405cf07eca5dd2c756530 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 9 Feb 2010 01:34:11 +0000 Subject: [PATCH] Test m_nowpeer pointer before using it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/toplevel_osx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/toplevel_osx.cpp b/src/osx/toplevel_osx.cpp index 8abcfbab43..16c88a85d8 100644 --- a/src/osx/toplevel_osx.cpp +++ b/src/osx/toplevel_osx.cpp @@ -95,7 +95,7 @@ bool wxTopLevelWindowMac::Destroy() // NB: this will get called during destruction if we don't do it now, // and may fire a kill focus event on a control being destroyed #if wxOSX_USE_CARBON - if (m_nowpeer->GetWXWindow()) + if (m_nowpeer && m_nowpeer->GetWXWindow()) ClearKeyboardFocus( (WindowRef)m_nowpeer->GetWXWindow() ); #endif return wxTopLevelWindowBase::Destroy();