Skip to content

Commit

Permalink
fixed possible crash in exif_item_get_integer
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Aug 18, 2009
1 parent c1371f7 commit 4fd2d2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exiv2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ gchar *exif_item_get_string(ExifItem *item, int idx)
gint exif_item_get_integer(ExifItem *item, gint *value)
{
try {
if (!item) return 0;
if (!item || exif_item_get_elements(item) == 0) return 0;
*value = ((Exiv2::Metadatum *)item)->toLong();
return 1;
}
Expand Down

0 comments on commit 4fd2d2e

Please sign in to comment.