From 565f28c1a73bf96c73ccab8ac9e2d256461a9cd8 Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Wed, 7 Oct 1998 12:15:48 +0000 Subject: [PATCH] Fixed RefCounting bug where following links would decrement the WebShell ref count :-( --- docshell/base/nsWebShell.cpp | 1 + webshell/src/nsWebShell.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index 9db3f60d875..4835844030e 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -1440,6 +1440,7 @@ nsWebShell::GetTarget(const PRUnichar* aName) nsIWebShell* target = nsnull; if (0 == name.Length()) { + NS_ADDREF_THIS(); return this; } diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index 9db3f60d875..4835844030e 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -1440,6 +1440,7 @@ nsWebShell::GetTarget(const PRUnichar* aName) nsIWebShell* target = nsnull; if (0 == name.Length()) { + NS_ADDREF_THIS(); return this; }