Bug 1312609. r=smaug a=abillings
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 29 Nov 2016 15:15:35 -0600
changeset 324731 65fa05989b391912d3c69d0b693dbd03a87cb1b0
parent 324730 c024721d9b03fac54eee5730a34f8e7bfbff2129
child 324732 f1cb42c8da5b70ea5f5391c6c3a78af914426725
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerssmaug, abillings
bugs1312609
milestone53.0a1
Bug 1312609. r=smaug a=abillings
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -8912,16 +8912,18 @@ nsDocShell::RestoreFromHistory()
   nsViewManager* newVM = shell ? shell->GetViewManager() : nullptr;
   nsView* newRootView = newVM ? newVM->GetRootView() : nullptr;
 
   // Insert the new root view at the correct location in the view tree.
   if (container) {
     nsSubDocumentFrame* subDocFrame =
       do_QueryFrame(container->GetPrimaryFrame());
     rootViewParent = subDocFrame ? subDocFrame->EnsureInnerView() : nullptr;
+  } else {
+    rootViewParent = nullptr;
   }
   if (sibling &&
       sibling->GetShell() &&
       sibling->GetShell()->GetViewManager()) {
     rootViewSibling = sibling->GetShell()->GetViewManager()->GetRootView();
   } else {
     rootViewSibling = nullptr;
   }