Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/src/src/app.cpp b/src/src/app.cpp 2index 81130fd..f98d37b 100644 3--- a/src/src/app.cpp 4+++ b/src/src/app.cpp 5@@ -602,7 +602,8 @@ bool CodeBlocksApp::OnInit() 6 m_BatchWindowAutoClose = true; 7 m_pSingleInstance = nullptr; 8 9- wxTheClipboard->Flush(); 10+ if (wxTheClipboard->IsOpened()) 11+ wxTheClipboard->Flush(); 12 13 wxCmdLineParser& parser = *Manager::GetCmdLineParser(); 14 parser.SetDesc(cmdLineDesc); 15@@ -851,7 +852,8 @@ bool CodeBlocksApp::OnInit() 16 17 int CodeBlocksApp::OnExit() 18 { 19- wxTheClipboard->Flush(); 20+ if (wxTheClipboard->IsOpened()) 21+ wxTheClipboard->Flush(); 22 23 if (g_DDEServer) delete g_DDEServer; 24