diff --git a/lib/preview/txt.php b/lib/preview/txt.php
index 89927fd580ada78947bfa0fd593b217aae1db614..c06f445e827c947a258fa0465d0907c018846bcb 100644
--- a/lib/preview/txt.php
+++ b/lib/preview/txt.php
@@ -17,6 +17,10 @@ class TXT extends Provider {
 		$content = $fileview->fopen($path, 'r');
 		$content = stream_get_contents($content);
 
+		if(trim($content) === '') {
+			return false;
+		}
+
 		$lines = preg_split("/\r\n|\n|\r/", $content);
 
 		$fontSize = 5; //5px