mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix buffer crash
This commit is contained in:
@@ -61,7 +61,7 @@ func (b *BufferPool) GetBuffer(p *Piece) (buff []byte, index int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *BufferPool) ReleaseBuffer(index int) {
|
func (b *BufferPool) ReleaseBuffer(index int) {
|
||||||
if index == -1 {
|
if index == -1 || b == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
b.mu.Lock()
|
b.mu.Lock()
|
||||||
|
|||||||
Reference in New Issue
Block a user