Gtk3: better check if cairo is valid.

This commit is contained in:
zeljan1 2025-01-14 11:22:26 +01:00
parent 2a59941a59
commit 8a8026c0c8

View File

@ -763,6 +763,8 @@ end;
function TGtk3WidgetSet.IsValidDC(const DC: HDC): Boolean;
begin
Result := DC <> 0;
if Result then
Result := TGtk3DeviceContext(DC).pcr <> nil;
end;
function TGtk3WidgetSet.IsValidGDIObject(const AGdiObject: HGDIOBJ): Boolean;