forked from mirror/OpenTTD
This commit is contained in:
@@ -112,8 +112,9 @@ void IniGroup::RemoveItem(const std::string &name)
|
|||||||
if (item->name != name) continue;
|
if (item->name != name) continue;
|
||||||
|
|
||||||
*prev = item->next;
|
*prev = item->next;
|
||||||
if (this->last_item == &this->item) {
|
/* "last_item" is a pointer to the "real-last-item"->next. */
|
||||||
this->last_item = &item->next;
|
if (this->last_item == &item->next) {
|
||||||
|
this->last_item = prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
item->next = nullptr;
|
item->next = nullptr;
|
||||||
|
Reference in New Issue
Block a user