diff options
author | bptato <nincsnevem662@gmail.com> | 2024-09-02 20:53:56 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-09-02 20:53:56 +0200 |
commit | 6ecac397b43de14589c29b601fd9e4d8b8524d9a (patch) | |
tree | 42a038147626719c073b3bc83fbc92da77a55e09 /src/css | |
parent | 78e6d4577e5cfce78c7052f7186667e2eab209d5 (diff) | |
download | chawan-6ecac397b43de14589c29b601fd9e4d8b8524d9a.tar.gz |
cascade: add missing nil check
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/cascade.nim | 2 |
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://", |