From 2204400282cb2919050c2447d85e66d715109640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 28 Feb 2021 18:52:37 +0100 Subject: [PATCH] cursor cache disable if not available. --- internal/webrtc/cursor/image.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/webrtc/cursor/image.go b/internal/webrtc/cursor/image.go index 2fc802c0..037161b7 100644 --- a/internal/webrtc/cursor/image.go +++ b/internal/webrtc/cursor/image.go @@ -60,6 +60,11 @@ func (manager *ImageCtx) Shutdown() { } func (manager *ImageCtx) GetCached(serial uint64) (*ImageEntry, error) { + // zero means no serial available + if serial == 0 { + return manager.fetchEntry() + } + manager.cacheMu.Lock() entry, ok := manager.cache[serial] manager.cacheMu.Unlock()