diff --git a/apps/recorder/interface.html b/apps/recorder/interface.html
index 266208ec6..989d03944 100644
--- a/apps/recorder/interface.html
+++ b/apps/recorder/interface.html
@@ -73,6 +73,11 @@ ${track.map(pt=>` ${0|pt.Skin}\n`).join("")}
}
function saveGPX(track, title) {
+ if (!track || !track[0] || !"Time" in track[0]) {
+ showToast("Error in trackfile.", "toast-error");
+ return;
+ }
+
var gpx = `
@@ -172,6 +177,10 @@ function getTrackList() {
return {headers:headers,l:data};
})(${JSON.stringify(filename)})`, trackInfo=>{
console.log(filename," => ",trackInfo);
+ if (!trackInfo || !"headers" in trackInfo) {
+ showToast("Error loading track list.", "toast-error");
+ resolve();
+ }
trackInfo.headers = trackInfo.headers.split(",");
trackList.push({
filename : filename,