From 6e961aeb262521742a4cd92e4620de193f159f7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 12 Apr 2022 20:42:32 +0200 Subject: [PATCH] shared/install: fix crash when reenable is called without --root --- src/shared/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/install.c b/src/shared/install.c index 58bccdcaa80..f7257c5ceb8 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -2825,7 +2825,7 @@ static int normalize_linked_files( return r; const char *p = NULL; - if (i && i->path) + if (i && i->path && i->root) /* Use startswith here, because we know that paths are normalized, and * path_startswith() would give us a relative path, but we need an absolute path * relative to i->root. -- 2.47.3