Bug 32702: GetHistoryState works as expected now - check for success, r=nisheeth

This commit is contained in:
pollmann%netscape.com 2000-03-24 03:36:55 +00:00
parent 18ca13c753
commit 5e8273ffd7
2 changed files with 2 additions and 2 deletions

View File

@ -1983,7 +1983,7 @@ nsGenericHTMLElement::GetPrimaryPresState(nsIHTMLContent* aContent,
if (presShell) {
nsCOMPtr<nsILayoutHistoryState> history;
result = presShell->GetHistoryState(getter_AddRefs(history));
if (history) {
if (NS_SUCCEEDED(result) && history) {
PRUint32 ID;
aContent->GetContentID(&ID);
result = history->GetState(ID, aPresState, aStateType);

View File

@ -1983,7 +1983,7 @@ nsGenericHTMLElement::GetPrimaryPresState(nsIHTMLContent* aContent,
if (presShell) {
nsCOMPtr<nsILayoutHistoryState> history;
result = presShell->GetHistoryState(getter_AddRefs(history));
if (history) {
if (NS_SUCCEEDED(result) && history) {
PRUint32 ID;
aContent->GetContentID(&ID);
result = history->GetState(ID, aPresState, aStateType);