Deskbar: fix a crash holding window over drag area

state: Call (Calling BeginLineArray with a count <= 0)

Thanks diver
This commit is contained in:
John Scipione 2017-09-11 13:45:01 -07:00
parent e4cb43d506
commit 00171c6f43

View File

@ -1675,6 +1675,10 @@ TResizeControl::Draw(BRect updateRect)
BRect dragRegion(updateRect);
int32 height = dragRegion.IntegerHeight();
if (height <= 0)
return;
rgb_color menuColor = ViewColor();
rgb_color menuHilite = menuColor;
if (IsTracking()) {
@ -1690,7 +1694,7 @@ TResizeControl::Draw(BRect updateRect)
rgb_color vdark = tint_color(menuHilite, B_DARKEN_3_TINT);
rgb_color light = tint_color(menuHilite, B_LIGHTEN_2_TINT);
BeginLineArray(dragRegion.IntegerHeight());
BeginLineArray(height);
BPoint where;
where.x = floorf((dragRegion.left + dragRegion.right) / 2 + 0.5) - 1;
where.y = dragRegion.top + 2;