From 28e024fdd58b8e0d7f9b787bf9b8f98cd273a621 Mon Sep 17 00:00:00 2001 From: "edburns%acm.org" Date: Thu, 24 Aug 2000 21:48:01 +0000 Subject: [PATCH] bug=36212, bustage r,a=HurricaneSherrif This checkin fixes a problem using the ?: operator and nsCOMPtr. --- layout/generic/nsObjectFrame.cpp | 16 ++++++++++++---- layout/html/base/src/nsObjectFrame.cpp | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index e1a9ab0df4a..5db3f23b12d 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -1709,10 +1709,18 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL, const char *aTarge postDataStream = do_QueryInterface(result, &rv); } } - rv = lh->OnLinkClick(content, eLinkVerb_Replace, - fullurl.GetUnicode(), - unitarget.GetUnicode(), - postDataStream); + if (postDataStream) { + rv = lh->OnLinkClick(content, eLinkVerb_Replace, + fullurl.GetUnicode(), + unitarget.GetUnicode(), + postDataStream); + } + else { + rv = lh->OnLinkClick(content, eLinkVerb_Replace, + fullurl.GetUnicode(), + unitarget.GetUnicode(), + nsnull); + } NS_IF_RELEASE(content); } NS_RELEASE(lh); diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp index e1a9ab0df4a..5db3f23b12d 100644 --- a/layout/html/base/src/nsObjectFrame.cpp +++ b/layout/html/base/src/nsObjectFrame.cpp @@ -1709,10 +1709,18 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL, const char *aTarge postDataStream = do_QueryInterface(result, &rv); } } - rv = lh->OnLinkClick(content, eLinkVerb_Replace, - fullurl.GetUnicode(), - unitarget.GetUnicode(), - postDataStream); + if (postDataStream) { + rv = lh->OnLinkClick(content, eLinkVerb_Replace, + fullurl.GetUnicode(), + unitarget.GetUnicode(), + postDataStream); + } + else { + rv = lh->OnLinkClick(content, eLinkVerb_Replace, + fullurl.GetUnicode(), + unitarget.GetUnicode(), + nsnull); + } NS_IF_RELEASE(content); } NS_RELEASE(lh);