about summary refs log tree commit diff stats
path: root/src/local/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-20 15:28:35 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-20 15:31:55 +0200
commit7cafa1f5e0f1e83ec5064764284433d64e94cc9f (patch)
tree97e10041df5a6d58a6a7f77538b81d3d1c8a3729 /src/local/client.nim
parent4183fbf5bc53e4208df443f343f97ab466384e21 (diff)
downloadchawan-7cafa1f5e0f1e83ec5064764284433d64e94cc9f.tar.gz
loader: copy cached items on buffer cloning
This fixes a bug where cloning buffers with images would crash the
browser.
Diffstat (limited to 'src/local/client.nim')
-rw-r--r--src/local/client.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index 60910bc8..97390528 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -406,7 +406,8 @@ proc acceptBuffers(client: Client) =
     if stream == nil:
       pager.alert("Error: failed to set up buffer")
       continue
-    let key = pager.addLoaderClient(container.process, container.loaderConfig)
+    let key = pager.addLoaderClient(container.process, container.loaderConfig,
+      container.clonedFrom)
     let loader = pager.loader
     stream.withPacketWriter w:
       w.swrite(key)