fix for unregistering notifications in a notification

This commit is contained in:
Ari Lazier 2016-11-09 18:01:56 -08:00
parent 85c655a91c
commit 3e37795d62
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ class RealmDelegate : public BindingContext {
arguments[0] = realm_object;
arguments[1] = Value::from_string(m_context, notification_name);
for (auto &callback : m_notifications) {
std::list<Protected<FunctionType>> notifications_copy(m_notifications);
for (auto &callback : notifications_copy) {
Function<T>::call(m_context, callback, realm_object, 2, arguments);
}
}