From 1a888aad7bc953b3cc99f5a1388c952dc72a976f Mon Sep 17 00:00:00 2001 From: kotofyt Date: Tue, 28 Oct 2025 19:23:56 +0200 Subject: [PATCH] ini fixes --- tier2/fileformats/ini.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tier2/fileformats/ini.cpp b/tier2/fileformats/ini.cpp index e686dee..f66a111 100644 --- a/tier2/fileformats/ini.cpp +++ b/tier2/fileformats/ini.cpp @@ -95,11 +95,13 @@ IINIFile *CINIManager::ReadFile( const char *psz ) CUtlBuffer data; pFile = filesystem->Open(psz, FILEMODE_READ); + if (!pFile) + return NULL; data = CUtlBuffer(pFile->Size()+1); pFile->Read(data.GetMemory(), pFile->Size()); pFile->Close(); - ReadString(data.GetMemory()); + return ReadString(data.GetMemory()); } IINIFile *CINIManager::ReadString( const char *psz )