mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
libfetchers/git: use unique_ptr::get() instead of operator*()
According to N4950 20.3.1.3.5 [unique.ptr.single.observers]/1, the behavior is undefined if get() == nullptr. Use get() instead of operator*() on a possibly-null unique_ptr. Fixes #10123.
This commit is contained in:
parent
edcb3430ef
commit
651e62781f
1 changed files with 1 additions and 1 deletions
|
@ -590,7 +590,7 @@ struct GitInputAccessor : InputAccessor
|
|||
i = lookupCache.emplace(path, std::move(entry)).first;
|
||||
}
|
||||
|
||||
return &*i->second;
|
||||
return i->second.get();
|
||||
}
|
||||
|
||||
git_tree_entry * need(const CanonPath & path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue