mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +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) {
|
||||
if index == -1 {
|
||||
if index == -1 || b == nil {
|
||||
return
|
||||
}
|
||||
b.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user