adding in null check since we dont ALWAYS use selection to output xif. this gets rid of an assertion that i found while fixing a regression 41814 r=donm a=donm ect

This commit is contained in:
mjudge%netscape.com 2000-06-07 22:46:11 +00:00
Родитель 334756250b
Коммит eeee01489a
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -3270,7 +3270,8 @@ nsDocument::CreateXIF(nsString & aBuffer, nsIDOMSelection* aSelection)
NS_ENSURE_TRUE(converter,NS_ERROR_FAILURE);
converter->Init(aBuffer);
converter->SetSelection(aSelection);
if (aSelection)
converter->SetSelection(aSelection);
converter->AddStartTag( NS_ConvertToString("section") , PR_TRUE);
converter->AddStartTag( NS_ConvertToString("section_head") , PR_TRUE);

Просмотреть файл

@ -3270,7 +3270,8 @@ nsDocument::CreateXIF(nsString & aBuffer, nsIDOMSelection* aSelection)
NS_ENSURE_TRUE(converter,NS_ERROR_FAILURE);
converter->Init(aBuffer);
converter->SetSelection(aSelection);
if (aSelection)
converter->SetSelection(aSelection);
converter->AddStartTag( NS_ConvertToString("section") , PR_TRUE);
converter->AddStartTag( NS_ConvertToString("section_head") , PR_TRUE);