diff --git a/src/automount.c b/src/automount.c index 414816b6404..f7bf7f32d40 100644 --- a/src/automount.c +++ b/src/automount.c @@ -735,6 +735,9 @@ static bool automount_check_gc(Unit *u) { assert(a); + if (!a->mount) + return false; + return UNIT_VTABLE(UNIT(a->mount))->check_gc(UNIT(a->mount)); }