diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 8b4b9352641..dea71ce031e 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -6148,6 +6148,7 @@ nsDocShell::GetRootScrollableView(nsIScrollableView ** aOutScrollView) nsCOMPtr shell; NS_ENSURE_SUCCESS(GetPresShell(getter_AddRefs(shell)), NS_ERROR_FAILURE); + NS_ENSURE_TRUE(shell, NS_ERROR_NULL_POINTER); nsCOMPtr viewManager; NS_ENSURE_SUCCESS(shell->GetViewManager(getter_AddRefs(viewManager)),