Patch #2880 2009-12-27 19:22

techy

Open clipboard before its use (debug8)
Download
2880-Open_clipboard.patch (712 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2009-12-31 14:55
Assigned to
mortenmacfly
Index: src/src/startherepage.cpp
===================================================================
--- src/src/startherepage.cpp    (revision 5986)
+++ src/src/startherepage.cpp    (working copy)
@@ -179,13 +179,17 @@
     || href.StartsWith(_T("http://developer.berlios.de/bugs/")))
     {
         wxTextDataObject *data = new wxTextDataObject(revInfo);
+        wxTheClipboard->Open();
         wxTheClipboard->SetData(data);
+        wxTheClipboard->Close();
     }
 
     if(href.IsSameAs(_T("rev")))
     {
         wxTextDataObject *data = new wxTextDataObject(revInfo);
+        wxTheClipboard->Open();
         wxTheClipboard->SetData(data);
+        wxTheClipboard->Close();
         return true;
     }
 
mortenmacfly 2009-12-28 19:40

I've modified this slightly to check if the call to wxTheClipboard->Open() succeeded (as proposed by wx docs).