From 89a69c601d5ab264d95dba73cb1fe00e0a5b6887 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 12 Feb 2004 07:16:44 +0000 Subject: [PATCH] patch applied for clearing m_data object upon closing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/clipbrd.cpp | 9 +++++++++ src/mac/clipbrd.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/mac/carbon/clipbrd.cpp b/src/mac/carbon/clipbrd.cpp index 91fc234410..6cbc655fc6 100644 --- a/src/mac/carbon/clipbrd.cpp +++ b/src/mac/carbon/clipbrd.cpp @@ -298,6 +298,15 @@ bool wxClipboard::AddData( wxDataObject *data ) void wxClipboard::Close() { m_open = false ; + + // Get rid of cached object. If this is not done copying from another application will + // only work once + if (m_data) + { + delete m_data; + m_data = (wxDataObject*) NULL; + } + } bool wxClipboard::IsSupported( const wxDataFormat &dataFormat ) diff --git a/src/mac/clipbrd.cpp b/src/mac/clipbrd.cpp index 91fc234410..6cbc655fc6 100644 --- a/src/mac/clipbrd.cpp +++ b/src/mac/clipbrd.cpp @@ -298,6 +298,15 @@ bool wxClipboard::AddData( wxDataObject *data ) void wxClipboard::Close() { m_open = false ; + + // Get rid of cached object. If this is not done copying from another application will + // only work once + if (m_data) + { + delete m_data; + m_data = (wxDataObject*) NULL; + } + } bool wxClipboard::IsSupported( const wxDataFormat &dataFormat ) -- 2.45.2