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:
@@ -137,12 +137,14 @@ TBarMenuTitle::DrawContent()
|
|||||||
|
|
||||||
menu->SetDrawingMode(B_OP_ALPHA);
|
menu->SetDrawingMode(B_OP_ALPHA);
|
||||||
|
|
||||||
BRect dstRect(fIcon->Bounds());
|
if (fIcon != NULL) {
|
||||||
dstRect.OffsetTo(frame.LeftTop());
|
BRect dstRect(fIcon->Bounds());
|
||||||
dstRect.OffsetBy(rintf(((frame.Width() - dstRect.Width()) / 2) - 1.0f),
|
dstRect.OffsetTo(frame.LeftTop());
|
||||||
rintf(((frame.Height() - dstRect.Height()) / 2) - 0.0f));
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user