mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix SIGSEGV in StringHashTable if such key is not exists
This commit is contained in:
parent
c811e1f0d0
commit
e102ad373a
@ -333,7 +333,11 @@ public:
|
||||
template <typename Submap, typename SubmapKey>
|
||||
auto ALWAYS_INLINE operator()(Submap & map, const SubmapKey & key, size_t hash)
|
||||
{
|
||||
return &map.find(key, hash)->getMapped();
|
||||
auto it = map.find(key, hash);
|
||||
if (!it)
|
||||
return decltype(&it->getMapped()){};
|
||||
else
|
||||
return &it->getMapped();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user