mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 13:49:32 +02:00
get printer's count before freeing dests
git-svn-id: trunk@8425 -
This commit is contained in:
parent
ee3c5a89d3
commit
9269e2f551
@ -438,7 +438,11 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCUPSPrinter.DoResetPrintersList;
|
||||
var
|
||||
PrintersCount: Longint;
|
||||
begin
|
||||
PrintersCount := Printers.Count;
|
||||
|
||||
inherited DoResetPrintersList;
|
||||
|
||||
if Assigned(fcupsPPD) then
|
||||
@ -446,7 +450,7 @@ begin
|
||||
ppdClose(fcupsPPD);
|
||||
fcupsPPD:=nil;
|
||||
end;
|
||||
|
||||
|
||||
if fcupsPPDName<>'' then
|
||||
begin
|
||||
DeleteFile(fcupsPPDName);
|
||||
@ -455,7 +459,7 @@ begin
|
||||
|
||||
FreeOptions;
|
||||
if Assigned(fcupsPrinters) and CUPSLibInstalled then begin
|
||||
cupsFreeDests(Printers.Count,fcupsPrinters);
|
||||
cupsFreeDests(PrintersCount,fcupsPrinters);
|
||||
fCupsPrinter := nil;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user