git/pack: check pf->pack for nil before Bterming it
This commit is contained in:
parent
18521fc8c6
commit
35a8152ebc
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ openpack(Packf *pf)
|
||||||
static void
|
static void
|
||||||
closepack(Packf *pf)
|
closepack(Packf *pf)
|
||||||
{
|
{
|
||||||
if(--pf->refs == 0){
|
if(--pf->refs == 0 && pf->pack != nil){
|
||||||
Bterm(pf->pack);
|
Bterm(pf->pack);
|
||||||
pf->pack = nil;
|
pf->pack = nil;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue