Bug 570314. Don't crash when GetXULWindowWidget doesn't find one. r=roc

This commit is contained in:
Matt Woodrow 2010-08-02 15:06:58 +12:00
parent df40488589
commit fdd1be4180

View File

@ -967,9 +967,7 @@ LayerManager*
nsChildView::GetLayerManager()
{
nsCocoaWindow* window = GetXULWindowWidget();
if (!window)
return nsnull;
if (window->GetAcceleratedRendering() != mUseAcceleratedRendering) {
if (window && window->GetAcceleratedRendering() != mUseAcceleratedRendering) {
mLayerManager = NULL;
mUseAcceleratedRendering = window->GetAcceleratedRendering();
}