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,6 +982,7 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
rgb_color c;
|
||||
|
||||
link.Read(&c, sizeof(rgb_color));
|
||||
if (myRootLayer)
|
||||
myRootLayer->Lock();
|
||||
fCurrentLayer->SetViewColor(RGBColor(c));
|
||||
|
||||
@@ -989,8 +990,10 @@ myRootLayer->Lock();
|
||||
if (myRootLayer)
|
||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->fVisible);
|
||||
#else
|
||||
if (myRootLayer)
|
||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->VisibleRegion());
|
||||
#endif
|
||||
if (myRootLayer)
|
||||
myRootLayer->Unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user