Patch #2888 2009-12-29 00:18

techy

Cosmetic fix of projectfile.cpp
Download
2888-Cosmetic_fix_o.patch (504 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2010-02-03 17:44
Assigned to
mortenmacfly
Index: src/sdk/projectfile.cpp
===================================================================
--- src/sdk/projectfile.cpp    (revision 5986)
+++ src/sdk/projectfile.cpp    (working copy)
@@ -102,7 +102,9 @@
 
 void ProjectFile::RemoveBuildTarget(const wxString& targetName)
 {
-    buildTargets.Remove(targetName);
+    int idx = buildTargets.Index(targetName);
+    if (idx != wxNOT_FOUND)
+        buildTargets.RemoveAt(idx);
 
     // remove this file from the target's list of files
     if (project)
techy 2009-12-29 00:20

(debug16)

Remove() is documented to fail with assertion when the element is not found - use Index() + RemoveAt() instead.