Handle null pointer bugs

git-svn-id: svn://10.0.0.236/trunk@5480 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp
1998-07-14 15:22:30 +00:00
parent f13e4e5b36
commit b5e35e2bd9

View File

@@ -476,8 +476,9 @@ ImageFrame::TriggerLink(nsIPresContext& aPresContext,
const nsString& aTargetSpec,
PRBool aClick)
{
nsILinkHandler* handler;
if (NS_OK == aPresContext.GetLinkHandler(&handler)) {
nsILinkHandler* handler = nsnull;
aPresContext.GetLinkHandler(&handler);
if (nsnull != handler) {
if (aClick) {
handler->OnLinkClick(this, aURLSpec, aTargetSpec);
}