Fix for bug 8317 -- leaked caret causes crash. r mjudge, a leaf.

This commit is contained in:
sfraser%netscape.com 1999-06-16 23:55:48 +00:00
Родитель 6605e55ca3
Коммит 99112db1a1
2 изменённых файлов: 6 добавлений и 4 удалений

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

@ -41,6 +41,7 @@
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
#include "nsIFocusTracker.h"
#include "nsICaret.h"
#include "nsXIFConverter.h"
#include "nsHTMLAtoms.h"
#include "nsILineBreaker.h"
@ -2268,8 +2269,8 @@ nsTextFrame::HandleMultiplePress(nsIPresContext& aPresContext,
nsInputEvent *inputEvent = (nsInputEvent *)aEvent;
if (NS_SUCCEEDED(rv) && shell) {
nsCOMPtr<nsIRenderingContext> acx;
nsICaret *caret;
rv = shell->GetCaret(&caret);
nsCOMPtr<nsICaret> caret;
rv = shell->GetCaret(getter_AddRefs(caret));
if (NS_FAILED(rv))
return rv;
rv = shell->CreateRenderingContext(this, getter_AddRefs(acx));

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

@ -41,6 +41,7 @@
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
#include "nsIFocusTracker.h"
#include "nsICaret.h"
#include "nsXIFConverter.h"
#include "nsHTMLAtoms.h"
#include "nsILineBreaker.h"
@ -2268,8 +2269,8 @@ nsTextFrame::HandleMultiplePress(nsIPresContext& aPresContext,
nsInputEvent *inputEvent = (nsInputEvent *)aEvent;
if (NS_SUCCEEDED(rv) && shell) {
nsCOMPtr<nsIRenderingContext> acx;
nsICaret *caret;
rv = shell->GetCaret(&caret);
nsCOMPtr<nsICaret> caret;
rv = shell->GetCaret(getter_AddRefs(caret));
if (NS_FAILED(rv))
return rv;
rv = shell->CreateRenderingContext(this, getter_AddRefs(acx));