Chromium Code Reviews| Index: Source/core/svg/properties/SVGPropertyTearOff.h |
| diff --git a/Source/core/svg/properties/SVGPropertyTearOff.h b/Source/core/svg/properties/SVGPropertyTearOff.h |
| index 0d3b45ce7b1e8a5863739e46441cd5cc21894a81..a78bdea5677ea5699aad232121805d653ed56f3a 100644 |
| --- a/Source/core/svg/properties/SVGPropertyTearOff.h |
| +++ b/Source/core/svg/properties/SVGPropertyTearOff.h |
| @@ -56,8 +56,10 @@ public: |
| void setValue(PropertyType& value) |
| { |
| - if (m_valueIsCopy) |
| + if (m_valueIsCopy) { |
| + detachChildren(); |
| delete m_value; |
| + } |
| m_valueIsCopy = false; |
| m_value = &value; |
| } |