mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-30 15:58:12 +01:00
This commit is contained in:
parent
460991ecf4
commit
ab601115a9
@ -112,8 +112,9 @@ void IniGroup::RemoveItem(const std::string &name)
|
||||
if (item->name != name) continue;
|
||||
|
||||
*prev = item->next;
|
||||
if (this->last_item == &this->item) {
|
||||
this->last_item = &item->next;
|
||||
/* "last_item" is a pointer to the "real-last-item"->next. */
|
||||
if (this->last_item == &item->next) {
|
||||
this->last_item = prev;
|
||||
}
|
||||
|
||||
item->next = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user