myRootLayer can be NULL for offscreen bitmaps, fixes crash on Media preferences
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14711 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -982,16 +982,19 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
|||||||
rgb_color c;
|
rgb_color c;
|
||||||
|
|
||||||
link.Read(&c, sizeof(rgb_color));
|
link.Read(&c, sizeof(rgb_color));
|
||||||
myRootLayer->Lock();
|
if (myRootLayer)
|
||||||
|
myRootLayer->Lock();
|
||||||
fCurrentLayer->SetViewColor(RGBColor(c));
|
fCurrentLayer->SetViewColor(RGBColor(c));
|
||||||
|
|
||||||
#ifndef NEW_CLIPPING
|
#ifndef NEW_CLIPPING
|
||||||
if (myRootLayer)
|
if (myRootLayer)
|
||||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->fVisible);
|
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->fVisible);
|
||||||
#else
|
#else
|
||||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->VisibleRegion());
|
if (myRootLayer)
|
||||||
|
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->VisibleRegion());
|
||||||
#endif
|
#endif
|
||||||
myRootLayer->Unlock();
|
if (myRootLayer)
|
||||||
|
myRootLayer->Unlock();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user