From 841fd3ba8dc737ceae756411adc885892b116184 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 13 Mar 2008 16:27:08 +0200 Subject: [PATCH] Don't try to save a route if route is empty. --- src/route.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/route.c b/src/route.c index 8c61c36..2042c4a 100644 --- a/src/route.c +++ b/src/route.c @@ -148,6 +148,11 @@ route_save(void) { GnomeVFSHandle *handle; +if (_route.head==_route.tail) { + MACRO_BANNER_SHOW_INFO(_window, _("No route exist.")); + return FALSE; +} + if (file_save(&_route_dir_uri, &_route_dir_uri, &handle)) { if (write_gpx(&_route, handle)) { MACRO_BANNER_SHOW_INFO(_window, _("Route Saved")); -- 2.39.5