diff --git a/src/coursebox/material/homepage_lectures_exercises.py b/src/coursebox/material/homepage_lectures_exercises.py
index d4ba93e4eb4d8d9df343f1b4ecf5c20b43d58609..769964c3a8e54c9fb4d646d499e3bbb5d26dd8a9 100644
--- a/src/coursebox/material/homepage_lectures_exercises.py
+++ b/src/coursebox/material/homepage_lectures_exercises.py
@@ -165,8 +165,9 @@ def make_lectures(week=None, mode=0, gather_pdf_out=True, gather_sixup=True, mak
         pdf_out = slider.latexmk(lecture_texfile, Linux=Linux)
         all_pdfs.append( (w,pdf_out))
 
-    handle_pdf_collection(paths, all_pdfs, gather_pdf_out=gather_pdf_out, gather_sixup=gather_sixup, odir=odex)
-
+    if len(all_pdfs) > 0:
+        handle_pdf_collection(paths, all_pdfs, gather_pdf_out=gather_pdf_out, gather_sixup=gather_sixup, odir=odex)
+# http://piazza.com/dtu.dk/spring2023/02465/home
 
 def handle_pdf_collection(paths, all_pdfs, gather_pdf_out, gather_sixup, odir):
     tmp_dir = paths['lectures'] + '/Collected/tmp'