mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
cursor cache disable if not available.
This commit is contained in:
parent
663270b0f5
commit
2204400282
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user