gtk: don't try to draw Text if Rect is empty

git-svn-id: trunk@16665 -
This commit is contained in:
paul 2008-09-21 13:32:30 +00:00
parent e7e9a83d4a
commit eee75551b6

View File

@ -3221,7 +3221,7 @@ begin
[DC, Str, Count, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom, Flags]));
if not IsValidDC(DC) then Exit(0);
if Count < -1 then Exit(0);
if (Count < -1) or (IsRectEmpty(Rect) and ((Flags and DT_CALCRECT) = 0)) then Exit(0);
// Don't try to use StrLen(Str) in cases count >= 0
// In those cases str is NOT required to have a null terminator !