X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..cdbd62d6ff290fd58acd1bc5574dfc79db3a6f70:/src/osx/carbon/clipbrd.cpp?ds=sidebyside diff --git a/src/osx/carbon/clipbrd.cpp b/src/osx/carbon/clipbrd.cpp index fd8e9a6d45..7835430e65 100644 --- a/src/osx/carbon/clipbrd.cpp +++ b/src/osx/carbon/clipbrd.cpp @@ -5,7 +5,6 @@ // Generalized clipboard implementation by Matthew Flatt // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -63,6 +62,8 @@ void wxClipboard::Clear() { wxDELETE(m_data); + wxCHECK_RET( m_pasteboard, "Clipboard creation failed." ); + OSStatus err = PasteboardClear( m_pasteboard ); if (err != noErr) { @@ -155,10 +156,10 @@ bool wxClipboard::GetData( wxDataObject& data ) wxCHECK_MSG( m_open, false, wxT("clipboard not open") ); - size_t formatcount = data.GetFormatCount() + 1; + size_t formatcount = data.GetFormatCount(wxDataObject::Set) + 1; wxDataFormat *array = new wxDataFormat[ formatcount ]; - array[0] = data.GetPreferredFormat(); - data.GetAllFormats( &array[1] ); + array[0] = data.GetPreferredFormat(wxDataObject::Set); + data.GetAllFormats( &array[1], wxDataObject::Set ); bool transferred = false;