mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
hasher: fix invalid memory address error when MaxAge == 0
When f.opt.MaxAge == 0, f.db is never set, however several methods later assume it is set and attempt to access it, causing an invalid memory address error. This change fixes the issue in a few spots (there may still be others I haven't yet encountered.)
This commit is contained in:
@@ -216,7 +216,7 @@ func (db *DB) loop() {
|
||||
|
||||
// Do a key-value operation and return error when done
|
||||
func (db *DB) Do(write bool, op Op) error {
|
||||
if db.queue == nil {
|
||||
if db == nil || db.queue == nil {
|
||||
return ErrInactive
|
||||
}
|
||||
r := &request{
|
||||
|
||||
Reference in New Issue
Block a user