mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
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()
|
||||
{
|
||||
/* is the file-item a folder? */
|
||||
// Is the file-item a folder?
|
||||
if (IS_FOLDER(this) &&
|
||||
// if the children list is empty, or the file-system version
|
||||
// change (it's like to say: the current this->children list
|
||||
@ -554,6 +554,8 @@ const FileItemList& FileItem::getChildren()
|
||||
child = static_cast<FileItem*>(*it);
|
||||
if (child->removed) {
|
||||
it = this->children.erase(it);
|
||||
|
||||
fileitems_map->erase(fileitems_map->find(child->keyname));
|
||||
delete child;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user