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 )