diff --git a/Action.c b/Action.c index cb132b4a..9e3b94b3 100644 --- a/Action.c +++ b/Action.c @@ -242,6 +242,9 @@ static Htop_Reaction actionToggleTreeView(State* st) { static Htop_Reaction actionExpandOrCollapseAllBranches(State* st) { ScreenSettings* ss = st->settings->ss; + if (!ss->treeView) { + return HTOP_OK; + } ss->allBranchesCollapsed = !ss->allBranchesCollapsed; if (ss->allBranchesCollapsed) ProcessList_collapseAllBranches(st->pl);