about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/css/cascade.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim
index 1cee3399..ebb74427 100644
--- a/src/css/cascade.nim
+++ b/src/css/cascade.nim
@@ -417,7 +417,7 @@ proc applyRulesFrameInvalid(frame: CascadeFrame; ua, user: CSSStylesheet;
       styledParent.children.add(styledText)
     of peCanvas:
       let bmp = HTMLCanvasElement(styledParent.node).bitmap
-      if bmp.cacheId != 0:
+      if bmp != nil and bmp.cacheId != 0:
         let content = CSSContent(
           t: ContentImage,
           s: "canvas://",