mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 05:50:06 +00:00
Properly erase/remove an observer
This commit is contained in:
parent
765dbabdb6
commit
d31c23e958
@ -85,7 +85,7 @@ public:
|
|||||||
|
|
||||||
void UnregisterObserver(DebuggerObserver* observer)
|
void UnregisterObserver(DebuggerObserver* observer)
|
||||||
{
|
{
|
||||||
std::remove(observers.begin(), observers.end(), observer);
|
observers.erase(std::remove(observers.begin(), observers.end(), observer), observers.end());
|
||||||
observer->observed = nullptr;
|
observer->observed = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user