Bug 777490 - Only dereference body after checking to see if body is null. r=gavin

This commit is contained in:
Jared Wein 2012-07-26 14:58:58 -07:00
parent a832fde353
commit 7d608a648e

View File

@ -348,7 +348,7 @@ var SocialToolbar = {
let doc = notifBrowser.contentDocument;
// "notif" is an implementation detail that we should get rid of
// eventually
let body = doc.getElementById("notif") || doc.body.firstChild;
let body = doc.getElementById("notif") || (doc.body && doc.body.firstChild);
if (!body)
return;
let h = body.scrollHeight > 0 ? body.scrollHeight : 300;