mirror of https://github.com/aseprite/aseprite.git
Fix bug with dead FileItems in fileitems_map.
This commit is contained in:
parent
57dd972ce5
commit
8cc1e0e7b7
|
@ -436,7 +436,7 @@ IFileItem* FileItem::getParent() const
|
||||||
|
|
||||||
const FileItemList& FileItem::getChildren()
|
const FileItemList& FileItem::getChildren()
|
||||||
{
|
{
|
||||||
/* is the file-item a folder? */
|
// Is the file-item a folder?
|
||||||
if (IS_FOLDER(this) &&
|
if (IS_FOLDER(this) &&
|
||||||
// if the children list is empty, or the file-system version
|
// if the children list is empty, or the file-system version
|
||||||
// change (it's like to say: the current this->children list
|
// change (it's like to say: the current this->children list
|
||||||
|
@ -554,6 +554,8 @@ const FileItemList& FileItem::getChildren()
|
||||||
child = static_cast<FileItem*>(*it);
|
child = static_cast<FileItem*>(*it);
|
||||||
if (child->removed) {
|
if (child->removed) {
|
||||||
it = this->children.erase(it);
|
it = this->children.erase(it);
|
||||||
|
|
||||||
|
fileitems_map->erase(fileitems_map->find(child->keyname));
|
||||||
delete child;
|
delete child;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue