Reviewed by Maciej.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Mar 2005 23:48:17 +0000 (23:48 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Mar 2005 23:48:17 +0000 (23:48 +0000)
        - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset

        * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_layer.cpp

index 9dad30c69d6f6be0ab22fc94b3b49ed719d55fce..a892a0909b7a0640f672796b2d5fc1c47ee1d281 100644 (file)
@@ -1,3 +1,11 @@
+2005-03-20  Darin Adler  <darin@apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset
+
+        * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.
+
 2005-03-20  David Harrison  <harrison@apple.com>
 
         Reviewed by Darin.
index a72973e6f9642ac3c57851c615e0a242b4e690b5..c2e80ba512ae54d64b3bb86d7f78ad2ba2393620 100644 (file)
@@ -521,7 +521,9 @@ RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repaint)
     
     // Update dashboard regions, scrolling may change the clip of a
     // particular region.
-    renderer()->canvas()->view()->updateDashboardRegions();
+    RenderCanvas *canvas = renderer()->canvas();
+    if (canvas)
+        canvas->view()->updateDashboardRegions();
 #endif
 
     // Fire the scroll DOM event.