diff --git a/src/system/SystemLayerImplLwIP.cpp b/src/system/SystemLayerImplLwIP.cpp index b94745659deeb1..e7032941b524d5 100644 --- a/src/system/SystemLayerImplLwIP.cpp +++ b/src/system/SystemLayerImplLwIP.cpp @@ -147,7 +147,7 @@ CHIP_ERROR LayerImplLwIP::HandleSystemLayerEvent(Object & aTarget, EventType aEv CHIP_ERROR LayerImplLwIP::AddEventHandlerDelegate(EventHandlerDelegate & aDelegate) { - LwIPEventHandlerDelegate lDelegate = static_cast(aDelegate); + LwIPEventHandlerDelegate & lDelegate = static_cast(aDelegate); VerifyOrReturnError(lDelegate.GetFunction() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); lDelegate.Prepend(mEventDelegateList); return CHIP_NO_ERROR;