mirror of https://gitlab.com/basile.b/dexed.git
use StrToIntDef to return a default value of 0 incase pgrep returns an invalid Integer
This commit is contained in:
parent
42aa1e67eb
commit
a0ff81dc4a
|
@ -6,7 +6,7 @@ interface
|
|||
|
||||
uses
|
||||
|
||||
Classes, SysUtils, StrUtils,
|
||||
Classes, SysUtils,
|
||||
{$IFDEF WINDOWS}
|
||||
Windows, JwaTlHelp32,
|
||||
{$ENDIF}
|
||||
|
@ -939,7 +939,7 @@ begin
|
|||
lst := TStringList.Create;
|
||||
try
|
||||
lst.LoadFromStream(proc.Output);
|
||||
Result := StrToInt(Trim(lst.Text));
|
||||
Result := StrToIntDef(Trim(lst.Text), 0);
|
||||
finally
|
||||
lst.Free;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue