CID 1500 : Potential NULL poiner dereference.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3eedbbbf0e
commit
a20769b39c
@ -815,12 +815,14 @@ BChannelSlider::_DrawThumbs()
|
||||
}
|
||||
}
|
||||
|
||||
BPoint drawHere;
|
||||
BRect bounds(fBacking->Bounds());
|
||||
drawHere.x = (Bounds().Width() - bounds.Width()) / 2.0;
|
||||
drawHere.y = (Bounds().Height() - bounds.Height()) - kPadding - fLineFeed;
|
||||
|
||||
if (fBacking && fBackingView) {
|
||||
BPoint drawHere;
|
||||
|
||||
BRect bounds(fBacking->Bounds());
|
||||
drawHere.x = (Bounds().Width() - bounds.Width()) / 2.0;
|
||||
drawHere.y = (Bounds().Height() - bounds.Height()) - kPadding
|
||||
- fLineFeed;
|
||||
|
||||
if (fBacking->Lock()) {
|
||||
// Clear the view's background
|
||||
fBackingView->FillRect(fBackingView->Bounds(), B_SOLID_LOW);
|
||||
@ -846,8 +848,8 @@ BChannelSlider::_DrawThumbs()
|
||||
float thumbDelta(ThumbDeltaFor(fCurrentChannel));
|
||||
|
||||
if (fIsVertical) {
|
||||
valueRect.OffsetTo((thumbFrame.Width() - width) / 2.0 +
|
||||
fCurrentChannel * thumbFrame.Width(),
|
||||
valueRect.OffsetTo((thumbFrame.Width() - width) / 2.0
|
||||
+ fCurrentChannel * thumbFrame.Width(),
|
||||
thumbDelta + thumbFrame.Height() + 2.0);
|
||||
if (valueRect.bottom > fBackingView->Frame().bottom)
|
||||
valueRect.OffsetBy(0.0, -(thumbFrame.Height() + 12.0));
|
||||
@ -874,13 +876,12 @@ BChannelSlider::_DrawThumbs()
|
||||
fBackingView->Sync();
|
||||
fBacking->Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
if (fBacking)
|
||||
DrawBitmapAsync(fBacking, drawHere);
|
||||
|
||||
// fClickDelta is used in MouseMoved()
|
||||
fClickDelta = drawHere;
|
||||
// fClickDelta is used in MouseMoved()
|
||||
fClickDelta = drawHere;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user