Commit cfa84f16 authored by cutealien's avatar cutealien

Fix: addFileArchive now grab()'s the archive when you pass one in by pointer.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5210 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f6623a32
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Fix: addFileArchive now grab()'s the archive when you pass one in by pointer.
- Fix: Prevent division by 0 in CGUIScrollBar::setPos - Fix: Prevent division by 0 in CGUIScrollBar::setPos
- Fix: Add missing serialization to CSceneNodeAnimatorCameraFPS and CSceneNodeAnimatorCameraMaya - Fix: Add missing serialization to CSceneNodeAnimatorCameraFPS and CSceneNodeAnimatorCameraMaya
- Fix: File-open dialog now restores the original locale after modifying it internally - Fix: File-open dialog now restores the original locale after modifying it internally
......
...@@ -428,15 +428,22 @@ bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase, ...@@ -428,15 +428,22 @@ bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase,
//! Adds an archive to the file system. //! Adds an archive to the file system.
bool CFileSystem::addFileArchive(IFileArchive* archive) bool CFileSystem::addFileArchive(IFileArchive* archive)
{ {
for (u32 i=0; i < FileArchives.size(); ++i) if ( archive )
{ {
if (archive == FileArchives[i]) for (u32 i=0; i < FileArchives.size(); ++i)
{ {
return false; if (archive == FileArchives[i])
{
return false;
}
} }
FileArchives.push_back(archive);
archive->grab();
return true;
} }
FileArchives.push_back(archive);
return true; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment