[shared_ptr] Fix hb_hash() crash on nullptr

pull/3627/head
Behdad Esfahbod 2 years ago
parent 4d646773cf
commit 7ec3aad20f
  1. 2
      src/hb-algs.hh

@ -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

Loading…
Cancel
Save