Commit 8b8af5d7 authored by Marian Triebe's avatar Marian Triebe

Fix possible crash in `actor` hash function

The crash occurred when passing a default constructed actor handle to
the hash function.
parent d760e34e
......@@ -232,7 +232,7 @@ namespace std {
template <>
struct hash<caf::actor> {
inline size_t operator()(const caf::actor& ref) const {
return static_cast<size_t>(ref->id());
return static_cast<size_t>(ref ? ref->id() : 0);
}
};
} // namespace std
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment