Check for invalid rects in BRegion::Include() and Exclude(). This fixes
weird text selection in BTextView() (for example, when an empty line was part of the selection). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24142 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -335,6 +335,9 @@ BRegion::Include(BRect rect)
|
|||||||
void
|
void
|
||||||
BRegion::Include(clipping_rect rect)
|
BRegion::Include(clipping_rect rect)
|
||||||
{
|
{
|
||||||
|
if (!valid_rect(rect))
|
||||||
|
return;
|
||||||
|
|
||||||
// convert to internal rect format
|
// convert to internal rect format
|
||||||
rect.right ++;
|
rect.right ++;
|
||||||
rect.bottom ++;
|
rect.bottom ++;
|
||||||
@@ -381,6 +384,9 @@ BRegion::Exclude(BRect rect)
|
|||||||
void
|
void
|
||||||
BRegion::Exclude(clipping_rect rect)
|
BRegion::Exclude(clipping_rect rect)
|
||||||
{
|
{
|
||||||
|
if (!valid_rect(rect))
|
||||||
|
return;
|
||||||
|
|
||||||
// convert to internal rect format
|
// convert to internal rect format
|
||||||
rect.right ++;
|
rect.right ++;
|
||||||
rect.bottom ++;
|
rect.bottom ++;
|
||||||
|
|||||||
Reference in New Issue
Block a user