X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..b236f090ed76944de442c06ff7d13e7cf87d9a16:/src/osx/carbon/clipbrd.cpp diff --git a/src/osx/carbon/clipbrd.cpp b/src/osx/carbon/clipbrd.cpp index 8bc1f65703..293173c9ec 100644 --- a/src/osx/carbon/clipbrd.cpp +++ b/src/osx/carbon/clipbrd.cpp @@ -36,7 +36,7 @@ // the trace mask we use with wxLogTrace() - call // wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here // (there will be a *lot* of them!) -#define TRACE_CLIPBOARD _T("clipboard") +#define TRACE_CLIPBOARD wxT("clipboard") IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) @@ -61,11 +61,9 @@ wxClipboard::~wxClipboard() void wxClipboard::Clear() { - if (m_data != NULL) - { - delete m_data; - m_data = NULL; - } + wxDELETE(m_data); + + wxCHECK_RET( m_pasteboard, "Clipboard creation failed." ); OSStatus err = PasteboardClear( m_pasteboard ); if (err != noErr) @@ -139,11 +137,7 @@ void wxClipboard::Close() // Get rid of cached object. // If this is not done, copying data from // another application will only work once - if (m_data) - { - delete m_data; - m_data = NULL; - } + wxDELETE(m_data); } bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )