TCarbonPrinter.GetCurrentPrinterName
Original Reporter info from Mantis: rossh_lz
-
Reporter name: Ross Hemingway
Original Reporter info from Mantis: rossh_lz
- Reporter name: Ross Hemingway
Description:
Printers for Lazarus package - OSX
TCarbonPrinter.GetCurrentPrinterName
With some OSX installs, this function can lead to a crash on app start up with fatal exceptions. The problem is the way some printers names are reported. Some remote printers (like a disconnected bluetooth one), will return a name value of ' ' (single space). This leads to a fatal exception further along.
The solution would be to add the following line to the end of the function:
if Result = ' ' then Result := '';
end;
Mantis conversion info:
- Mantis ID: 20112
- Version: 0.9.30.1 (SVN)
- Fixed in revision: 34340 (#3f028017)
- Target version: 0.99
- LazTarget: 0.99.0