diff --git a/src/main/java/com/j256/simplemagic/ContentInfoUtil.java b/src/main/java/com/j256/simplemagic/ContentInfoUtil.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/j256/simplemagic/ContentInfoUtil.java
+++ b/src/main/java/com/j256/simplemagic/ContentInfoUtil.java
@@ -316,7 +316,7 @@ public class ContentInfoUtil {
 	private MagicEntries readEntriesFromResource(String resource) throws IOException {
 		InputStream stream = getClass().getResourceAsStream(resource);
 		if (stream == null) {
-			return null;
+			throw new IllegalStateException("Internal magic file was not found: " + resource);
 		}
 		Reader reader = null;
 		try {
Throw exception if resource not found.