Index: Source/WebCore/svg/animation/SVGSMILElement.cpp |
=================================================================== |
--- Source/WebCore/svg/animation/SVGSMILElement.cpp (revision 109389) |
+++ Source/WebCore/svg/animation/SVGSMILElement.cpp (working copy) |
@@ -200,14 +200,17 @@ |
m_timeContainer->unschedule(this); |
m_timeContainer = 0; |
} |
+ // Calling disconnectConditions() may kill us if there are syncbase conditions. |
+ // OK, but we don't want to die inside the call. |
+ RefPtr<SVGSMILElement> keepAlive(this); |
+ disconnectConditions(); |
+ |
+ // Clear target now, because disconnectConditions calls targetElement() which will recreate the target if we removed it sooner. |
if (m_targetElement) { |
document()->accessSVGExtensions()->removeAnimationElementFromTarget(this, m_targetElement); |
m_targetElement = 0; |
} |
- // Calling disconnectConditions() may kill us if there are syncbase conditions. |
- // OK, but we don't want to die inside the call. |
- RefPtr<SVGSMILElement> keepAlive(this); |
- disconnectConditions(); |
+ |
SVGElement::removedFromDocument(); |
} |