fpexif: Fix crash when IPTC tag is not found.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6830 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2019-03-12 22:23:01 +00:00
parent a52a6a75a8
commit 0105538d1e

View File

@ -245,6 +245,9 @@ function TIptcData.AddTag(ATag: TTag): Integer;
var
idx: Integer;
begin
if ATag = nil then
exit(-1);
idx := IndexOfTagID(ATag.TagID);
if idx <> -1 then begin
// Replace existing tag