From: robertlipe Date: Sun, 14 Dec 2014 01:11:37 +0000 (+0000) Subject: Fix brain-o from last gpx change. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=955006bbb2a77d10ba27061ac6793ccae779d34d;p=gpsbabel.git Fix brain-o from last gpx change. --- diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index 4d76be645..52f105050 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -1798,10 +1798,12 @@ gpx_write(void) * available use it, otherwise use the default. */ - if (gpx_version.isEmpty()) { - gpx_wversion = (char*)"1.0"; - } else { - gpx_wversion = xstrdup(gpx_version); + if (!gpx_wversion) { + if (gpx_version.isEmpty()) { + gpx_wversion = (char*)"1.0"; + } else { + gpx_wversion = xstrdup(gpx_version); + } } if (opt_humminbirdext || opt_garminext) {