TBarMenuTitle::DrawContents() now checks if there is a logo before trying to
draw it. This fixes the crashing bug when being compiled from Zeta (because of the different message storage format) - debugged under Haiku thanks to Ingo's great work :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13969 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3b0024c780
commit
ec130eefb6
@ -137,12 +137,14 @@ TBarMenuTitle::DrawContent()
|
||||
|
||||
menu->SetDrawingMode(B_OP_ALPHA);
|
||||
|
||||
BRect dstRect(fIcon->Bounds());
|
||||
dstRect.OffsetTo(frame.LeftTop());
|
||||
dstRect.OffsetBy(rintf(((frame.Width() - dstRect.Width()) / 2) - 1.0f),
|
||||
rintf(((frame.Height() - dstRect.Height()) / 2) - 0.0f));
|
||||
if (fIcon != NULL) {
|
||||
BRect dstRect(fIcon->Bounds());
|
||||
dstRect.OffsetTo(frame.LeftTop());
|
||||
dstRect.OffsetBy(rintf(((frame.Width() - dstRect.Width()) / 2) - 1.0f),
|
||||
rintf(((frame.Height() - dstRect.Height()) / 2) - 0.0f));
|
||||
|
||||
menu->DrawBitmapAsync(fIcon, dstRect);
|
||||
menu->DrawBitmapAsync(fIcon, dstRect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user