jvcllaz: Fix JvId3v2 demo crashing when tags are deleted.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6991 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-06-01 22:16:21 +00:00
parent 7837fad7d1
commit 68dec86999
2 changed files with 5 additions and 2 deletions

View File

@ -12,7 +12,7 @@ object JvID3v2EditForm: TJvID3v2EditForm
OnCreate = FormCreate
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.0.2.0'
LCLVersion = '2.1.0.0'
object lsbNavigator: TListBox
Left = 4
Height = 479

View File

@ -365,7 +365,10 @@ var
OldYear, Month, Day: Word;
begin
DecodeDate(ADateTime, OldYear, Month, Day);
Result := EncodeDate(NewYear, Month, Day);
if NewYear <= 0 then
Result := 0
else
Result := EncodeDate(NewYear, Month, Day);
end;
procedure TJvID3v2EditForm.CtrlsToTag;