Fix uninitialized string that was causing the deskbar volume control replicant to crash randomly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29150 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -250,7 +250,7 @@ VolumeSlider::VolumeSlider(BRect frame, bool dontBeep, int32 volumeWhich)
|
|||||||
|
|
||||||
float value = 0.0;
|
float value = 0.0;
|
||||||
fDontBeep = dontBeep;
|
fDontBeep = dontBeep;
|
||||||
const char *errString;
|
const char *errString = NULL;
|
||||||
fMixerControl = new MixerControl(volumeWhich, &value, &errString);
|
fMixerControl = new MixerControl(volumeWhich, &value, &errString);
|
||||||
|
|
||||||
BBox *box = new BBox(Bounds(), "sliderbox", B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
BBox *box = new BBox(Bounds(), "sliderbox", B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||||
@@ -381,8 +381,7 @@ SliderView::Draw(BRect updateRect)
|
|||||||
SetHighColor(156,154,156);
|
SetHighColor(156,154,156);
|
||||||
FillRect(BRect(position,3,192,13));
|
FillRect(BRect(position,3,192,13));
|
||||||
|
|
||||||
BFont font;
|
float width = be_plain_font->StringWidth(fTitle);
|
||||||
float width = font.StringWidth(fTitle);
|
|
||||||
|
|
||||||
SetHighColor(49,154,49);
|
SetHighColor(49,154,49);
|
||||||
DrawString(fTitle, BPoint(11 + (192-11-width)/2, 12));
|
DrawString(fTitle, BPoint(11 + (192-11-width)/2, 12));
|
||||||
|
|||||||
Reference in New Issue
Block a user