diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index ffdc699bce34..ba7963529c2a 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -873,9 +873,12 @@ public: if (!known) { nsresult rv = mHistory->FetchPageInfo(place, &known); if (NS_FAILED(rv)) { - nsCOMPtr event = - new NotifyPlaceInfoCallback(mCallback, place, true, rv); - return NS_DispatchToMainThread(event); + if (mCallback) { + nsCOMPtr event = + new NotifyPlaceInfoCallback(mCallback, place, true, rv); + return NS_DispatchToMainThread(event); + } + return NS_OK; } }