Make sure to remove dead weak delegates from events.

This commit is contained in:
Gunnar Beutner 2012-03-31 09:36:38 +02:00
parent 0a73519030
commit b0ed08d4b5
1 changed files with 4 additions and 1 deletions

View File

@ -42,7 +42,10 @@ public:
prev = i;
i++;
(*prev)(args);
int result = (*prev)(args);
if (result == -1)
m_Delegates.erase(prev);
}
}
};