зеркало из https://github.com/mozilla/gecko-dev.git
Bug 802995 - Missing null check in nsTextServicesDocument::DeleteSelection; r=ehsan
This commit is contained in:
Родитель
2afd934910
Коммит
f2d701a18c
|
@ -1383,13 +1383,14 @@ nsTextServicesDocument::DeleteSelection()
|
|||
|
||||
nsCOMPtr<nsIContent> curContent;
|
||||
|
||||
if (mIteratorStatus != nsTextServicesDocument::eIsDone &&
|
||||
mIterator->GetCurrentNode()->IsContent()) {
|
||||
if (mIteratorStatus != nsTextServicesDocument::eIsDone) {
|
||||
// The old iterator is still pointing to something valid,
|
||||
// so get its current node so we can restore it after we
|
||||
// create the new iterator!
|
||||
|
||||
curContent = mIterator->GetCurrentNode()->AsContent();
|
||||
curContent = mIterator->GetCurrentNode()
|
||||
? mIterator->GetCurrentNode()->AsContent()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
// Create the new iterator.
|
||||
|
|
Загрузка…
Ссылка в новой задаче