From dafc583198469706ba195f9da26aad1130fb3872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karsten=20Ball=C3=BCder?= Date: Fri, 18 Jun 1999 17:38:19 +0000 Subject: [PATCH] replaced a wrong assert with an if git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/richedit/wxlwindow.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/samples/richedit/wxlwindow.cpp b/samples/richedit/wxlwindow.cpp index e767192d5c..f25d30b5fb 100644 --- a/samples/richedit/wxlwindow.cpp +++ b/samples/richedit/wxlwindow.cpp @@ -289,10 +289,13 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event) // selecting? if ( event.LeftIsDown() ) { - wxASSERT_MSG( m_Selecting, "should be set in OnMouseLeftDown" ); - - m_llist->ContinueSelection(cursorPos, m_ClickPosition); - DoPaint(); // TODO: we don't have to redraw everything! + // m_Selecting might not be set if the button got pressed + // outside this window, so check for it: + if(m_Selecting) + { + m_llist->ContinueSelection(cursorPos, m_ClickPosition); + DoPaint(); // TODO: we don't have to redraw everything! + } } if ( u )