Index: webkit/glue/touch_fling_gesture_curve.cc |
diff --git a/webkit/glue/touch_fling_gesture_curve.cc b/webkit/glue/touch_fling_gesture_curve.cc |
index d33a6894aa8965d3696d4f50791dc9b0083f1139..523500db1cc7085b10941835a07b3d57f03bdbb9 100644 |
--- a/webkit/glue/touch_fling_gesture_curve.cc |
+++ b/webkit/glue/touch_fling_gesture_curve.cc |
@@ -165,6 +165,8 @@ bool TouchFlingGestureCurve::apply(double time, WebGestureCurveTarget* target) { |
cumulative_scroll_ = WebSize(scroll.x, scroll.y); |
if (time + time_offset_ < curve_duration_ || scroll_increment != WebPoint()) { |
+ // scrollBy() could delete this curve if the animation is over, so don't |
+ // touch any member variables after making that call. |
target->scrollBy(scroll_increment); |
return true; |
} |