fixed crash
This commit is contained in:
parent
72fc594aa2
commit
b9b26f1cd4
1 changed files with 8 additions and 4 deletions
|
|
@ -159,7 +159,8 @@ namespace Crafter {
|
|||
// Clear previous timing data
|
||||
this->listenerTimes.clear();
|
||||
|
||||
for (const auto& listenerSlice : this->listeners) {
|
||||
auto listenersCopy = listenerSlice.second;
|
||||
for (const auto& listenerSlice : listenersCopy) {
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
listener->function();
|
||||
|
|
@ -169,7 +170,8 @@ namespace Crafter {
|
|||
}
|
||||
}
|
||||
#else
|
||||
for (const auto& listenerSlice : this->listeners) {
|
||||
auto listenersCopy = listenerSlice.second;
|
||||
for (const auto& listenerSlice : listenersCopy) {
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
listener->function();
|
||||
}
|
||||
|
|
@ -189,7 +191,8 @@ namespace Crafter {
|
|||
// Clear previous timing data
|
||||
this->listenerTimes.clear();
|
||||
|
||||
for (const auto& listenerSlice : this->listeners) {
|
||||
auto listenersCopy = listenerSlice.second;
|
||||
for (const auto& listenerSlice : listenersCopy) {
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
listener->function(data);
|
||||
|
|
@ -199,7 +202,8 @@ namespace Crafter {
|
|||
}
|
||||
}
|
||||
#else
|
||||
for (const auto& listenerSlice : this->listeners) {
|
||||
auto listenersCopy = listenerSlice.second;
|
||||
for (const auto& listenerSlice : listenersCopy) {
|
||||
for (const auto& listener : listenerSlice.second) {
|
||||
listener->function(data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue