More checks for ActiveWayPoint++
Fix minor GDI leak
More check on ActiveWayPoint
Wait for 10 consecutive seconds with invalid data , to reset LD rotary buffer.
Do not reset the buffer if no new data has been inserted since last reset.
Optimize again the nmea logger .  This is called every time we receive an NMEA string!
Landing Task point is not removed correctly in ".Cup" task loading
Fix uninitialized variable.
fix Wrong GDI usage
Merge branch 'fix' of https://github.com/brunotl/LK8000 into v50
(CC) IMPORTANT note on use of FindOrAddWaypoint() and code simply reformatted with notes.
Safe NULL pointers after memcpy in FindOrAddWaypoints, and returns -1 not false in case of error.
Fix do not save to task Comments and Details from CTaskFileHelper, and check for FindOrAddWaypoint can return -1.
Do not load to task an invalid waypoint index.
Apply fix to CTaskFileHelper LPTSR and free(szContent)
Forgotten free in previous fix
Fix LoadCupTask not managing invalid return value from FindOrAddWaypoint
Apply fix to LoadCupTask memset missing and clear mapWaypoint.
Notice that Comment and Details should always be NULL!!
If they are not null, then we most likely have an invalid pointer.
Fix wrong NULL assignement in LoadTaskWaypoints
Fix LoadGpsTask using TASK_COMMENTS
Set to NULL Comment and Details in old "LoadNewTask", so we remove the problem at the origin
Refix the FindOrAddWaypoint because now we set to NULL old task file's comments and details at the origin.