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:
Stefano Ceccherini 2008-02-26 15:20:39 +00:00
parent e6fdb84b92
commit 748347fc20

View File

@ -335,6 +335,9 @@ BRegion::Include(BRect rect)
void
BRegion::Include(clipping_rect rect)
{
if (!valid_rect(rect))
return;
// convert to internal rect format
rect.right ++;
rect.bottom ++;
@ -381,6 +384,9 @@ BRegion::Exclude(BRect rect)
void
BRegion::Exclude(clipping_rect rect)
{
if (!valid_rect(rect))
return;
// convert to internal rect format
rect.right ++;
rect.bottom ++;