mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 20:56:14 +02:00
gtk: a more safer code for dashes allocation
git-svn-id: trunk@22156 -
This commit is contained in:
parent
08748087fa
commit
83c67a0a1b
@ -4013,9 +4013,13 @@ begin
|
||||
GObject^.GDIPenWidth := dwWidth;
|
||||
SetGDIColorRef(GObject^.GDIPenColor, lplb.lbColor);
|
||||
GObject^.GDIPenDashesCount := dwStyleCount;
|
||||
|
||||
if dwStyleCount > 0 then
|
||||
begin
|
||||
GetMem(GObject^.GDIPenDashes, dwStyleCount * SizeOf(gint8));
|
||||
for i := 0 to dwStyleCount - 1 do
|
||||
GObject^.GDIPenDashes[i] := lpStyle[i];
|
||||
end;
|
||||
|
||||
Result := HPEN(PtrUInt(GObject));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user