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:
parent
a52a6a75a8
commit
0105538d1e
@ -245,6 +245,9 @@ function TIptcData.AddTag(ATag: TTag): Integer;
|
|||||||
var
|
var
|
||||||
idx: Integer;
|
idx: Integer;
|
||||||
begin
|
begin
|
||||||
|
if ATag = nil then
|
||||||
|
exit(-1);
|
||||||
|
|
||||||
idx := IndexOfTagID(ATag.TagID);
|
idx := IndexOfTagID(ATag.TagID);
|
||||||
if idx <> -1 then begin
|
if idx <> -1 then begin
|
||||||
// Replace existing tag
|
// Replace existing tag
|
||||||
|
Loading…
Reference in New Issue
Block a user