Gather options in a vector when running Buffer::on_option_changed
on_option_changed might trigger hooks that will mutate the option managers, invalidating the iterators we use.
This commit is contained in:
parent
919b7ce645
commit
d4e36958f8
|
@ -127,7 +127,9 @@ void Buffer::on_registered()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& option : options().flatten_options())
|
for (auto& option : options().flatten_options()
|
||||||
|
| transform(&std::unique_ptr<Option>::get)
|
||||||
|
| gather<Vector<Option*>>())
|
||||||
on_option_changed(*option);
|
on_option_changed(*option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user