diff --git a/applications/cactusjukebox/source/cactusjukebox.lpi b/applications/cactusjukebox/source/cactusjukebox.lpi index f0ff86663..aaa8a8414 100644 --- a/applications/cactusjukebox/source/cactusjukebox.lpi +++ b/applications/cactusjukebox/source/cactusjukebox.lpi @@ -18,7 +18,7 @@ - + diff --git a/applications/cactusjukebox/source/mplayer.pas b/applications/cactusjukebox/source/mplayer.pas index 5b72eb63e..f8f562d17 100644 --- a/applications/cactusjukebox/source/mplayer.pas +++ b/applications/cactusjukebox/source/mplayer.pas @@ -364,6 +364,7 @@ var tmps: string; i:integer; time: real; begin + result := -1; if GetMPlayerPlaying then begin i:=0; repeat begin @@ -375,11 +376,13 @@ begin until (pos('time_pos', tmps)>0) or (i>=3); i:=LastDelimiter('=', tmps); if i > 0 then begin - time:= StrToFloat(Copy(tmps, i+1, Length(tmps)), MPlayerFormatSettings); - time:=time*1000; - result:=round(time); - end else result:=-1; - end else result:=-1; + if TryStrToFloat(Copy(tmps, i+1, Length(tmps)), time, MPlayerFormatSettings) then + begin + time:=time*1000; + result:=round(time); + end; + end; + end; end; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++