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 )