mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1081992 Needs null check at notifying TextComposition of composition event being discarded r=smaug
This commit is contained in:
parent
1d962eb79e
commit
0dce5a393a
@ -979,6 +979,16 @@ IMEStateManager::OnCompositionEventDiscarded(
|
||||
|
||||
nsRefPtr<TextComposition> composition =
|
||||
sTextCompositions->GetCompositionFor(aCompositionEvent->widget);
|
||||
if (!composition) {
|
||||
// If the PresShell has been being destroyed during composition,
|
||||
// a TextComposition instance for the composition was already removed from
|
||||
// the array and destroyed in OnDestroyPresContext(). Therefore, we may
|
||||
// fail to retrieve a TextComposition instance here.
|
||||
PR_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnCompositionEventDiscarded(), "
|
||||
"TextComposition instance for the widget has already gone"));
|
||||
return;
|
||||
}
|
||||
composition->OnCompositionEventDiscarded(aCompositionEvent);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user