Bug 375093, Crash [@ nsTypedSelection::ScrollIntoView] when right-clicking paste in input which then gets destroyed oninput, r+sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@222273 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Olli.Pettay%helsinki.fi
2007-03-23 17:32:34 +00:00
parent b34885521f
commit b1dd2d9bf8

View File

@@ -7287,7 +7287,7 @@ nsTypedSelection::ScrollIntoView(SelectionRegion aRegion, PRBool aIsSynchronous)
//
nsCOMPtr<nsIPresShell> presShell;
result = GetPresShell(getter_AddRefs(presShell));
if (NS_FAILED(result))
if (NS_FAILED(result) || !presShell)
return result;
nsCOMPtr<nsICaret> caret;
presShell->GetCaret(getter_AddRefs(caret));