[shared_ptr] Fix hb_hash() crash on nullptr
This commit is contained in:
parent
4d646773cf
commit
7ec3aad20f
|
@ -245,7 +245,7 @@ struct
|
||||||
template <typename T> constexpr uint32_t
|
template <typename T> constexpr uint32_t
|
||||||
impl (const hb::shared_ptr<T>& v, hb_priority<1>) const
|
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
|
template <typename T> constexpr auto
|
||||||
|
|
Loading…
Reference in New Issue