From 10d4023e0d7c87a1e23b0305fbed8d6254565cd1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 May 2013 15:56:53 +0000 Subject: [PATCH] Test for NULL associated frame in doc/view event handling code. A view might not have any associated frame at all (this is probably a bad idea but we don't seem to explicitly forbid this). This should have been part of r73943, see #14314. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/docview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 4118192..fc1c256 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -2076,7 +2076,7 @@ bool wxDocParentFrameAnyBase::TryProcessEvent(wxEvent& event) if ( wxView* const view = m_docManager->GetAnyUsableView() ) { wxWindow* win = view->GetFrame(); - if ( win != m_frame ) + if ( win && win != m_frame ) { // Notice that we intentionally don't use wxGetTopLevelParent() // here because we want to check both for the case of a child -- 2.7.4