mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-15 10:03:16 +02:00
gtk: don't try to draw Text if Rect is empty
git-svn-id: trunk@16665 -
This commit is contained in:
parent
e7e9a83d4a
commit
eee75551b6
@ -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 !
|
||||
|
Loading…
Reference in New Issue
Block a user