mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 802995 - Missing null check in nsTextServicesDocument::DeleteSelection; r=ehsan
This commit is contained in:
parent
2afd934910
commit
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.
|
||||
|
Loading…
Reference in New Issue
Block a user