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:
parent
9ae89b4535
commit
428ebf6d5f
@ -982,16 +982,19 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
rgb_color c;
|
||||
|
||||
link.Read(&c, sizeof(rgb_color));
|
||||
myRootLayer->Lock();
|
||||
if (myRootLayer)
|
||||
myRootLayer->Lock();
|
||||
fCurrentLayer->SetViewColor(RGBColor(c));
|
||||
|
||||
#ifndef NEW_CLIPPING
|
||||
if (myRootLayer)
|
||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->fVisible);
|
||||
#else
|
||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->VisibleRegion());
|
||||
if (myRootLayer)
|
||||
myRootLayer->GoRedraw(fCurrentLayer, fCurrentLayer->VisibleRegion());
|
||||
#endif
|
||||
myRootLayer->Unlock();
|
||||
if (myRootLayer)
|
||||
myRootLayer->Unlock();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user