Added lots of security using asserts.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -1 +0,0 @@
|
||||
#include "EventHook.hpp"
|
||||
@@ -16,6 +16,7 @@ namespace CreatureLib::Battling {
|
||||
void RegisterListener(EVENT_HOOK_FUNC(func)) { _listeners.push_back(func); }
|
||||
|
||||
void TriggerEvent(EventData* eventData) const {
|
||||
AssertNotNull(eventData)
|
||||
for (auto listener : _listeners) {
|
||||
listener(eventData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user