Carbon: fixed crash when no printers installed. Issues #15475 and #20112

git-svn-id: trunk@34340 -
This commit is contained in:
zeljko 2011-12-21 07:42:49 +00:00
parent 99f59d9279
commit 3f02801700

View File

@ -126,7 +126,10 @@ var
begin
Result := '';
P := GetCurrentPrinter;
if P <> nil then Result := CFStringToStr(PMPrinterGetName(P));
if P <> nil then
Result := CFStringToStr(PMPrinterGetName(P));
if Trim(Result) = '' then
Result := '';
end;
procedure TCarbonPrinter.BeginPage;