Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: core/cross/shape.cc

Issue 14302004: Fix an error in the destructor for Shape.cc (Closed) Base URL: svn://chrome-svn/chrome/trunk/o3d/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/version.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/shape.cc
===================================================================
--- core/cross/shape.cc (revision 194715)
+++ core/cross/shape.cc (working copy)
@@ -49,9 +49,10 @@
}
Shape::~Shape() {
+ ElementRefArray copy(elements_.begin(), elements_.end());
// Unregister any Elements that might think they own us.
- ElementRefArray::iterator iter, end = elements_.end();
- for (iter = elements_.begin(); iter != end; ++iter) {
+ ElementRefArray::iterator iter, end = copy.end();
+ for (iter = copy.begin(); iter != end; ++iter) {
if (iter->Get()) {
iter->Get()->SetOwner(0);
}
« no previous file with comments | « build/version.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698