diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index cb640b7ee7c..e15a0454704 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -2935,7 +2935,7 @@ static void writeDefaultQuickLinks(TextStream &t,
}
renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HighlightedItem::Search);
}
- else
+ else if (!Config_getBool(GENERATE_TREEVIEW))
{
renderQuickLinksAsTree(t,relPath,root);
}