Fixes #5213, Sometimes NPE in SaveWaypoint
Fixes #5213, Sometimes NPE in SaveWaypoint

- check for valid state before attempting save

xiaoyanit/cgeo,rsudev/c-geo-opensource,kumy/cgeo,cgeo/cgeo,Bananeweizen/cgeo,pstorch/cgeo,Bananeweizen/cgeo,auricgoldfinger/cgeo,matej116/cgeo,mucek4/cgeo,rsudev/c-geo-opensource,pstorch/cgeo,mucek4/cgeo,SammysHP/cgeo,samueltardieu/cgeo,S-Bartfast/cgeo,tobiasge/cgeo,kumy/cgeo,samueltardieu/cgeo,xiaoyanit/cgeo,pstorch/cgeo,S-Bartfast/cgeo,Bananeweizen/cgeo,superspindel/cgeo,cgeo/cgeo,cgeo/cgeo,SammysHP/cgeo,mucek4/cgeo,S-Bartfast/cgeo,superspindel/cgeo,ThibaultR/cgeo,superspindel/cgeo,matej116/cgeo,tobiasge/cgeo,cgeo/cgeo,kumy/cgeo,rsudev/c-geo-opensource,auricgoldfinger/cgeo,matej116/cgeo,SammysHP/cgeo,ThibaultR/cgeo,tobiasge/cgeo,auricgoldfinger/cgeo,xiaoyanit/cgeo,samueltardieu/cgeo,ThibaultR/cgeo