Fix segfault while running with -a option and deinstalling broken
packages with incorrect plists. PR: bin/115327 Submitted by: Michael Zhilin <mizhka@gmail.com> MFC after: 3 days
This commit is contained in:
parent
dd85d6d345
commit
dffc4d533f
@ -266,7 +266,7 @@ pkg_do(char *pkg)
|
||||
for (p = Plist.head; p ; p = p->next) {
|
||||
if (p->type != PLIST_PKGDEP)
|
||||
continue;
|
||||
deporigin = (p->next->type == PLIST_DEPORIGIN) ? p->next->name :
|
||||
deporigin = (p->next != NULL && p->next->type == PLIST_DEPORIGIN) ? p->next->name :
|
||||
NULL;
|
||||
if (Verbose) {
|
||||
printf("Trying to remove dependency on package '%s'", p->name);
|
||||
|
Loading…
Reference in New Issue
Block a user