test 2 done

This commit is contained in:
2023-10-17 15:12:51 +02:00
parent c1e65d41ee
commit 4002757765
3 changed files with 3 additions and 5 deletions

View File

@ -37,7 +37,7 @@ void XFDispatcher::dispatchEvent(const XFEvent *pEvent) const {
//Trace::out("[DEBUG] - Dispatch Event");
XFBehavior::TerminateBehavior terminateBehavior;
terminateBehavior = pEvent->getBehavior()->process(pEvent);
if(terminateBehavior) {
if(terminateBehavior && pEvent->getBehavior()->deleteOnTerminate()) {
delete pEvent->getBehavior();
if(pEvent->deleteAfterConsume()) {
delete pEvent;