Reviewed by Darin Fisher.
https://bugs.webkit.org/show_bug.cgi?id=23973
ScrollView::scrollContents can be invoked during view shutdown. In
this scenario the FrameView::hostWindow method can return NULL, which
indicates that the frame/page is being destroyed. This causes a crash
when we try to dereference a NULL hostWindow pointer. Fix is to add a
NULL check for this.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollContents):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41260
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-02-16 Anantanarayanan Iyengar <ananta@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23973
+ ScrollView::scrollContents can be invoked during view shutdown. In
+ this scenario the FrameView::hostWindow method can return NULL, which
+ indicates that the frame/page is being destroyed. This causes a crash
+ when we try to dereference a NULL hostWindow pointer. Fix is to add a
+ NULL check for this.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+
2009-02-26 Rahul Kuchhal <kuchhal@chromium.org>
Reviewed by Dave Hyatt.
void ScrollView::scrollContents(const IntSize& scrollDelta)
{
+ if (!hostWindow())
+ return;
+
// Since scrolling is double buffered, we will be blitting the scroll view's intersection
// with the clip rect every time to keep it smooth.
IntRect clipRect = windowClipRect();