diff --git a/toolkit/components/history/src/nsGlobalHistory.cpp b/toolkit/components/history/src/nsGlobalHistory.cpp index ede5344299ea..a004bf9bb544 100644 --- a/toolkit/components/history/src/nsGlobalHistory.cpp +++ b/toolkit/components/history/src/nsGlobalHistory.cpp @@ -1595,7 +1595,7 @@ nsGlobalHistory::GetSource(nsIRDFResource* aProperty, // XXX We could be more forgiving here, and check for literal // values as well. nsCOMPtr target = do_QueryInterface(aTarget); - if (IsURLInHistory(target)) + if (target && IsURLInHistory(target)) return CallQueryInterface(aTarget, aSource); }