fix #2729: crash on GPX export
Merge branch 'release' into upstream