Index: sky/engine/core/painting/LayoutRoot.cpp |
diff --git a/sky/engine/core/painting/LayoutRoot.cpp b/sky/engine/core/painting/LayoutRoot.cpp |
index c63acaa76d9e6278bcacc742cda8ad4a5d16d219..78c3ee6c7757409615c6ed29e44bb851c9400885 100644 |
--- a/sky/engine/core/painting/LayoutRoot.cpp |
+++ b/sky/engine/core/painting/LayoutRoot.cpp |
@@ -10,6 +10,7 @@ |
#include "sky/engine/core/frame/FrameView.h" |
#include "sky/engine/core/frame/LocalFrame.h" |
#include "sky/engine/core/frame/Settings.h" |
+#include "sky/engine/core/painting/Canvas.h" |
#include "sky/engine/core/painting/PaintingTasks.h" |
#include "sky/engine/platform/geometry/IntRect.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
@@ -83,7 +84,7 @@ void LayoutRoot::layout() |
void LayoutRoot::paint(Canvas* canvas) |
{ |
- if (m_document) |
+ if (m_document && canvas && canvas->skCanvas()) |
rootElement()->paint(canvas); |
} |