Bug 15178, r=vidur adding check for null-pointer avoiding crash

git-svn-id: svn://10.0.0.236/trunk@50281 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
av%netscape.com
1999-10-08 23:46:23 +00:00
parent 22765f12e4
commit c4fd2231d1
2 changed files with 6 additions and 0 deletions

View File

@@ -1438,6 +1438,9 @@ extern nsresult NS_GetObjectFramePluginInstance(nsIFrame* aFrame, nsIPluginInsta
nsresult
NS_GetObjectFramePluginInstance(nsIFrame* aFrame, nsIPluginInstance*& aPluginInstance)
{
if(aFrame == nsnull)
return NS_ERROR_NULL_POINTER;
// TODO: any way to determine this cast is safe?
nsObjectFrame* objectFrame = NS_STATIC_CAST(nsObjectFrame*, aFrame);
return objectFrame->GetPluginInstance(aPluginInstance);