[shared_ptr] Fix hb_hash() crash on nullptr

This commit is contained in:
Behdad Esfahbod 2022-06-02 10:50:55 -06:00
parent 4d646773cf
commit 7ec3aad20f
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ struct
template <typename T> constexpr uint32_t
impl (const hb::shared_ptr<T>& v, hb_priority<1>) const
{
return (uint32_t) (intptr_t) v.get ()->hash ();
return v.get () ? v.get ()->hash () : 0;
}
template <typename T> constexpr auto