]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/richedit/wxlwindow.cpp
Unicode fixes. Appears that this may be the last before wxMSW will link
[wxWidgets.git] / samples / richedit / wxlwindow.cpp
index e767192d5cd8d7784826d553d4c160d9803c330d..f25d30b5fb061c6df751a4aa3506feda44c9555d 100644 (file)
@@ -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 )