Skip to content

Commit

Permalink
Merge pull request #33 from Rrivera5127/master
Browse files Browse the repository at this point in the history
do not require GPSAltitudeRef to return altitude
  • Loading branch information
decriptor committed Apr 20, 2016
2 parents 19392d1 + 1a7286c commit bf4181c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TagLib/IFD/IFDTag.cs
Expand Up @@ -413,10 +413,10 @@ public override void Clear ()
var altitude = gps_ifd.GetRationalValue (0, (ushort) GPSEntryTag.GPSAltitude);
var ref_entry = gps_ifd.GetByteValue (0, (ushort) GPSEntryTag.GPSAltitudeRef);

if (altitude == null || ref_entry == null)
if (altitude == null)
return null;

if (ref_entry.Value == 1)
if (ref_entry != null && ref_entry.Value == 1)
altitude *= -1.0d;

return altitude;
Expand Down

0 comments on commit bf4181c

Please sign in to comment.