]> git.saurik.com Git - wxWidgets.git/commitdiff
patch applied for clearing m_data object upon closing
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 12 Feb 2004 07:16:44 +0000 (07:16 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 12 Feb 2004 07:16:44 +0000 (07:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/clipbrd.cpp
src/mac/clipbrd.cpp

index 91fc234410384e084ad26ce91b56f7f0d7008f5c..6cbc655fc61f30a927140c3752334896fc750368 100644 (file)
@@ -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 )
index 91fc234410384e084ad26ce91b56f7f0d7008f5c..6cbc655fc61f30a927140c3752334896fc750368 100644 (file)
@@ -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 )