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,6 +428,8 @@ bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase, ...@@ -428,6 +428,8 @@ 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)
{ {
if ( archive )
{
for (u32 i=0; i < FileArchives.size(); ++i) for (u32 i=0; i < FileArchives.size(); ++i)
{ {
if (archive == FileArchives[i]) if (archive == FileArchives[i])
...@@ -436,7 +438,12 @@ bool CFileSystem::addFileArchive(IFileArchive* archive) ...@@ -436,7 +438,12 @@ bool CFileSystem::addFileArchive(IFileArchive* archive)
} }
} }
FileArchives.push_back(archive); FileArchives.push_back(archive);
archive->grab();
return true; 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