Make ExecutingAttack a local variable while being used, to ensure it's always cleaned up.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-29 18:49:48 +02:00
parent a9740cb1eb
commit d51919c74f
2 changed files with 19 additions and 10 deletions

View File

@@ -9,3 +9,15 @@
next->hookName(__VA_ARGS__); \
} \
}
#define HOOK_LOCAL(hookName, source, ...) \
{ \
auto aggregator = source.GetScriptIterator(); \
aggregator.Reset(); \
while (aggregator.HasNext()) { \
auto next = aggregator.GetNext(); \
if (next == nullptr) \
continue; \
next->hookName(__VA_ARGS__); \
} \
}