X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdf20a26dba64a6d31dead1e1d19b2d755c0af13..ae26e17b93fd8c3dce7c66ce9f23475867160f62:/src/common/debugrpt.cpp

diff --git a/src/common/debugrpt.cpp b/src/common/debugrpt.cpp
index 88beafc6bb..a903051fcf 100644
--- a/src/common/debugrpt.cpp
+++ b/src/common/debugrpt.cpp
@@ -6,7 +6,7 @@
 // Created:     2005-01-17
 // RCS-ID:      $Id$
 // Copyright:   (c) 2005 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// License:     wxWindows licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -268,8 +268,10 @@ wxDebugReport::AddFile(const wxString& filename, const wxString& description)
         // we need to copy the file to the debug report directory: give it the
         // same name there
         name = fn.GetFullName();
-        wxCopyFile(fn.GetFullPath(),
-                   wxFileName(GetDirectory(), name).GetFullPath());
+
+        if (!wxCopyFile(fn.GetFullPath(),
+                        wxFileName(GetDirectory(), name).GetFullPath()))
+           return;
     }
     else // file relative to the report directory
     {