fix #3690: NPE while exporting GPX