[XEX] Check if header exists during XexInfoCache init

This commit is contained in:
marko1616 2025-01-08 12:12:48 +08:00 committed by Radosław Gliński
parent 762145687b
commit 34da168284
1 changed files with 4 additions and 0 deletions

View File

@ -1397,6 +1397,10 @@ void XexInfoCache::Init(XexModule* xexmod) {
};
bool did_exist = try_open();
if (!GetHeader()) {
return;
}
if (!did_exist) {
GetHeader()->version = CURRENT_INFOCACHE_VERSION;