Bug 936969, make sure to null check the return value of GetFrameElementInternal(), r=bholley

--HG--
extra : rebase_source : 91f1276627c6f31aa2d8de18a1dfc8d8ee533bec