diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index bd9219b949da55..2509dba50a39f0 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -792,15 +792,15 @@ void InteractionModelEngine::RemoveReadClient(ReadClient * apReadClient) while (pCurListItem != apReadClient) { + // + // Item must exist in this tracker list. If not, there's a bug somewhere. + // + VerifyOrDie(pCurListItem != nullptr); + pPrevListItem = pCurListItem; pCurListItem = pCurListItem->GetNextClient(); } - // - // Item must exist in this tracker list. If not, there's a bug somewhere. - // - VerifyOrDie(pCurListItem != nullptr); - if (pPrevListItem) { pPrevListItem->SetNextClient(apReadClient->GetNextClient());