X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..ec2df34e27ba41f202ecbf096cdfed082a9ddb8f:/src/osx/carbon/clipbrd.cpp diff --git a/src/osx/carbon/clipbrd.cpp b/src/osx/carbon/clipbrd.cpp index fd8e9a6d45..5024215e12 100644 --- a/src/osx/carbon/clipbrd.cpp +++ b/src/osx/carbon/clipbrd.cpp @@ -63,6 +63,8 @@ void wxClipboard::Clear() { wxDELETE(m_data); + wxCHECK_RET( m_pasteboard, "Clipboard creation failed." ); + OSStatus err = PasteboardClear( m_pasteboard ); if (err != noErr) { @@ -155,10 +157,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;