diff --git a/autowiring/CoreContext.h b/autowiring/CoreContext.h index cdec6704e..374c507f9 100644 --- a/autowiring/CoreContext.h +++ b/autowiring/CoreContext.h @@ -673,12 +673,11 @@ class CoreContext: template InvokeRelay Invoke(MemFn memFn){ typedef typename Decompose::type EventType; - typedef typename SelectTypeUnifier::type UnifiedType; if (!std::is_same::value) GetGlobal()->Invoke(&AutowiringEvents::EventFired)(*this, typeid(EventType)); - return MakeInvokeRelay(GetJunctionBox(), memFn); + return MakeInvokeRelay(GetJunctionBox(), memFn); } /// diff --git a/autowiring/JunctionBox.h b/autowiring/JunctionBox.h index c15c8c86b..5e312825d 100644 --- a/autowiring/JunctionBox.h +++ b/autowiring/JunctionBox.h @@ -145,7 +145,9 @@ class JunctionBox: fn(*currentEvent.m_ptr, args...); } catch(...) { teardown.push_back(ContextDumbToWeak(currentEvent.m_owner)); - this->FilterFiringException(currentEvent.m_ptr); + + typedef typename SelectTypeUnifier::type ObjectBase_t; + this->FilterFiringException(autowiring::fast_pointer_cast(currentEvent.m_ptr)); } lk.lock();