зеркало из https://github.com/mozilla/pjs.git
Bug 15178, r=vidur adding check for null-pointer avoiding crash
This commit is contained in:
Родитель
9f90f3f700
Коммит
132357b3c7
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче