diff --git a/app/controllers/oer/endpoints.php b/app/controllers/oer/endpoints.php
index 813e31dc3c8dd17b2f6023515772b7ec3c0de850..cbd4b884593b58147a6dc5871691e65b029c9fb0 100644
--- a/app/controllers/oer/endpoints.php
+++ b/app/controllers/oer/endpoints.php
@@ -324,6 +324,9 @@ class Oer_EndpointsController extends StudipController
         }
         page_close();
 
+        if (!file_exists($this->material->getFilePath())) {
+            throw new Exception(_('Die gewünschte Datei konnte nicht gefunden werden.'));
+        }
         $filesize = filesize($this->material->getFilePath());
         header("Accept-Ranges: bytes");
         $start = 0;