Browse Source

Stop if no data read

Piotr Czajkowski 3 years ago
parent
commit
dc9479a7bb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      PSDText/PSDText.cs

+ 3 - 0
PSDText/PSDText.cs

@@ -84,6 +84,9 @@ namespace PSDText
                 throw new FileNotFoundException($"File {path} doesn't exist!");
 
             _xmlData = Readxmpmeta(path);
+            if (string.IsNullOrWhiteSpace(_xmlData))
+                throw new Exception("No data was read!");
+
             AddXMLNamespaces();
             TextData = GetTextData();
         }