From d43a87787fbd90c304a61ea7f216eb6bcff6ace2 Mon Sep 17 00:00:00 2001 From: "disttsc%bart.nl" Date: Thu, 7 Dec 2000 06:24:12 +0000 Subject: [PATCH] Fix potential crash, bug 51663, r=radha, a=brendan --- xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp b/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp index 9ab21f9f650c..3e51798cc3b2 100644 --- a/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp +++ b/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 0 -*- * * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file @@ -410,8 +410,9 @@ nsUrlbarHistory::SearchCache(const PRUnichar* searchStr, nsIAutoCompleteResults* rv = entries->GetNext(getter_AddRefs(entry)); if (entry) { - literal = do_QueryInterface(entry); - literal->GetValueConst(&rdfValue); + literal = do_QueryInterface(entry); + if (literal) + literal->GetValueConst(&rdfValue); } if (rdfValue) { rdfAStr = (rdfValue);