diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt index aca396da21..c961ac314f 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt @@ -101,6 +101,10 @@ public class CacheImporter @Inject constructor( // import master index val masterIndex = createMasterIndex(store) + if (masterIndex.index.entries.isEmpty()) { + throw IOException("Master index empty, cache probably corrupt") + } + val masterIndexId = try { addMasterIndex(connection, masterIndex) } finally {