From fad3aa302a939a498993410dc3d578975f0de434 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 25 May 2016 09:57:11 +0300 Subject: [PATCH] Fix gps info (photo note) without gps fix --- .../src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index 8641db9ba2..f2fbfcb36d 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -1574,8 +1574,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { r.lon = geo.getLongitude(); Float heading = app.getLocationProvider().getHeading(); Location loc = app.getLocationProvider().getLastKnownLocation(); - if (lastTakingPhoto != null && lastTakingPhoto.getName().equals(f.getName()) && heading != null) { - float rot = heading.floatValue(); + if (lastTakingPhoto != null && lastTakingPhoto.getName().equals(f.getName())) { + float rot = heading != null ? heading : 0; try { r.updatePhotoInformation(r.lat, r.lon, loc, rot == 0 ? Double.NaN : rot); } catch (IOException e) {