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);