SWORD25: Fix initialization.

svn-id: r53245
This commit is contained in:
Eugene Sandulenko 2010-08-14 22:32:23 +00:00
parent fbdbc089e0
commit f4024d7d14
2 changed files with 4 additions and 5 deletions

View File

@ -71,8 +71,7 @@ BS_GraphicEngine::BS_GraphicEngine(BS_Kernel *pKernel) :
m_FrameTimeSampleSlot(0),
m_RepaintedPixels(0),
BS_ResourceService(pKernel) {
for (int i = 0; i < FRAMETIME_SAMPLE_COUNT; i++)
m_FrameTimeSamples[i] = 0;
m_FrameTimeSamples.resize(FRAMETIME_SAMPLE_COUNT);
if (!RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");

View File

@ -223,7 +223,7 @@ bool BS_ScummVMPackageManager::LoadDirectoryAsPackage(const Common::String &Dire
void *BS_ScummVMPackageManager::GetFile(const Common::String &FileName, unsigned int *FileSizePtr) {
Common::SeekableReadStream *in;
Common::ArchiveMemberPtr fileNode = GetArchiveMember(FileName);
if (fileNode->getName().empty())
if (!fileNode)
return 0;
if (!(in = fileNode->createReadStream()))
return 0;
@ -267,7 +267,7 @@ Common::String BS_ScummVMPackageManager::GetAbsolutePath(const Common::String &F
unsigned int BS_ScummVMPackageManager::GetFileSize(const Common::String &FileName) {
Common::SeekableReadStream *in;
Common::ArchiveMemberPtr fileNode = GetArchiveMember(FileName);
if (fileNode->getName().empty())
if (!fileNode)
return 0;
if (!(in = fileNode->createReadStream()))
return 0;
@ -290,7 +290,7 @@ unsigned int BS_ScummVMPackageManager::GetFileType(const Common::String &FileNam
bool BS_ScummVMPackageManager::FileExists(const Common::String &FileName) {
Common::ArchiveMemberPtr fileNode = GetArchiveMember(FileName);
return !fileNode->getName().empty();
return fileNode;
}
// -----------------------------------------------------------------------------