Bug 778442 - Add some null guards in nsPluginInstanceOwner::GetVisibleRect r=blassey

--HG--
extra : rebase_source : 314d6defe42a0908f071eb7ca78393470b854f05
This commit is contained in:
James Willcox 2012-09-11 10:20:44 -04:00
Родитель 0912706617
Коммит b6f92bf3d1
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -1806,6 +1806,9 @@ already_AddRefed<ImageContainer> nsPluginInstanceOwner::GetImageContainerForVide
nsIntRect nsPluginInstanceOwner::GetVisibleRect()
{
if (!mObjectFrame || !mPluginWindow)
return nsIntRect(0, 0, 0, 0);
gfxRect r = nsIntRect(0, 0, mPluginWindow->width, mPluginWindow->height);
float xResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetXResolution();