Fix a potential null-deref in TabChild::HandlePossibleViewportChange. (bug 1156156, r=kats)

This commit is contained in:
David Anderson 2015-04-20 11:16:55 -04:00
parent 0392ce1c6a
commit 0bc85d152d

View File

@ -275,6 +275,9 @@ TabChildBase::HandlePossibleViewportChange(const ScreenIntSize& aOldScreenSize)
Stringify(aOldScreenSize).c_str(), Stringify(mInnerSize).c_str());
nsCOMPtr<nsIDocument> document(GetDocument());
if (!document) {
return false;
}
nsViewportInfo viewportInfo = nsContentUtils::GetViewportInfo(document, mInnerSize);
uint32_t presShellId = 0;