diff --git a/src/fitparser.cpp b/src/fitparser.cpp index b25be212..97c39acf 100644 --- a/src/fitparser.cpp +++ b/src/fitparser.cpp @@ -14,6 +14,11 @@ FITParser::FITParser(QList &tracks, QList &routes, QList &waypoints) : Parser(tracks, routes, waypoints) { memset(_defs, 0, sizeof(_defs)); + + _device = 0; + _endian = 0; + _timestamp = 0; + _len = 0; } void FITParser::clearDefinitions() @@ -335,10 +340,11 @@ bool FITParser::parseHeader() bool FITParser::loadFile(QFile *file) { + bool ret = true; + _device = file; _endian = 0; _timestamp = 0; - bool ret = true; if (!parseHeader()) return false; diff --git a/src/igcparser.h b/src/igcparser.h index 41af6683..13a41f9e 100644 --- a/src/igcparser.h +++ b/src/igcparser.h @@ -10,7 +10,8 @@ class IGCParser : public Parser { public: IGCParser(QList &tracks, QList &routes, - QList &waypoints) : Parser(tracks, routes, waypoints) {} + QList &waypoints) : Parser(tracks, routes, waypoints) + {_errorLine = 0;} ~IGCParser() {} bool loadFile(QFile *file); diff --git a/src/pathitem.cpp b/src/pathitem.cpp index 63d0bd8c..1e62d194 100644 --- a/src/pathitem.cpp +++ b/src/pathitem.cpp @@ -26,6 +26,7 @@ PathItem::PathItem(QGraphicsItem *parent) : QGraphicsObject(parent) _pen = QPen(brush, PATH_WIDTH); _units = Metric; + _distance = 0; _marker = new MarkerItem(this);