diff --git a/toolkit/components/places/src/nsMorkHistoryImporter.cpp b/toolkit/components/places/src/nsMorkHistoryImporter.cpp index 7049742880f..6e5a00b90a1 100644 --- a/toolkit/components/places/src/nsMorkHistoryImporter.cpp +++ b/toolkit/components/places/src/nsMorkHistoryImporter.cpp @@ -158,7 +158,12 @@ AddToHistoryCB(const nsCSubstring &aRowID, : (PRInt32) nsINavHistoryService::TRANSITION_LINK; nsNavHistory *history = data->history; - history->AddPageWithVisit(uri, nsDependentString(title, titleLength), + nsAutoString titleStr; + if (titleLength) + titleStr = nsDependentString(title, titleLength); + else + titleStr.SetIsVoid(PR_TRUE); + history->AddPageWithVisit(uri, titleStr, PR_FALSE, isTyped, count, transition, date); } return PL_DHASH_NEXT;