]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix memory leak of XRC ids introduced by the ID range support patch.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Nov 2010 19:33:55 +0000 (19:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Nov 2010 19:33:55 +0000 (19:33 +0000)
Fix bug in linked list processing in RemoveXRCIDEntry() added in r66059: it
incorrectly overwrote the XRC id table entry with the next element in the list
instead of just updating the pointer used during iteration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/xrc/xmlres.cpp

index 10ff03fc3989730bba9192a39b17c5739690ec9b..57f57de8aa5c7836ff70ed200128d84b85d79ad4 100644 (file)
@@ -2638,7 +2638,7 @@ void wxIdRangeManager::RemoveXRCIDEntry(const char *str_id)
         }
         else
         {
-            (*p_previousrec) = rec;
+            p_previousrec = &rec;
         }
     }
 }