Skip to content
Snippets Groups Projects
Commit 3cbe97c4 authored by armar-user's avatar armar-user
Browse files

MemoryListener: checking for nullptr

parent 547ace12
No related branches found
No related tags found
1 merge request!317Feature/open fridge
......@@ -63,12 +63,16 @@ namespace armarx::armem::client::util
};
subscribe(subscriptionID, cb);
}
template <class CalleeT>
void subscribe(const MemoryID& subscriptionID, CalleeT* callee, MemberCallbackUpdatedOnly<CalleeT> callback)
{
auto cb = [callee, callback](const MemoryID&, const std::vector<MemoryID>& updatedSnapshotIDs)
{
(callee->*callback)(updatedSnapshotIDs);
if(callee)
{
(callee->*callback)(updatedSnapshotIDs);
}
};
subscribe(subscriptionID, cb);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment