X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/518ba66331d4e63376448802ce23fb7f7da82250..0aaa804e7019b8187e2d35dffba133b43af79533:/src/html/htmlwin.cpp diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 00be22276a..83307773bc 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -181,6 +181,7 @@ void wxHtmlWindow::Init() #endif // wxUSE_CLIPBOARD m_backBuffer = NULL; m_eraseBgInOnPaint = false; + m_tmpSelFromCell = NULL; } bool wxHtmlWindow::Create(wxWindow *parent, wxWindowID id, @@ -271,6 +272,9 @@ bool wxHtmlWindow::SetPage(const wxString& source) wxDELETE(m_selection); + // we will soon delete all the cells, so clear pointers to them: + m_tmpSelFromCell = NULL; + // pass HTML through registered processors: if (m_Processors || m_GlobalProcessors) { @@ -800,7 +804,7 @@ bool wxHtmlWindow::CopySelection(ClipboardType t) #if wxUSE_CLIPBOARD if ( m_selection ) { -#ifdef __UNIX__ +#if defined(__UNIX__) && !defined(__WXMAC__) wxTheClipboard->UsePrimarySelection(t == Primary); #else // !__UNIX__ // Primary selection exists only under X11, so don't do anything under @@ -822,6 +826,8 @@ bool wxHtmlWindow::CopySelection(ClipboardType t) return true; } } +#else + wxUnusedVar(t); #endif // wxUSE_CLIPBOARD return false; @@ -1023,6 +1029,8 @@ void wxHtmlWindow::OnMouseDown(wxMouseEvent& event) CaptureMouse(); } } +#else + wxUnusedVar(event); #endif // wxUSE_CLIPBOARD }