From: Kaj-Michael Lang Date: Sun, 27 Apr 2008 20:09:05 +0000 (+0300) Subject: Fix crasher X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cffc1a0d1f039ad49a6339fb3c4e0b5646d6672;p=mapper Fix crasher --- diff --git a/src/maemo-osso.c b/src/maemo-osso.c index 9f6354b..ead0471 100644 --- a/src/maemo-osso.c +++ b/src/maemo-osso.c @@ -43,6 +43,7 @@ #include "map.h" #include "map-download.h" #include "route.h" +#include "track.h" #include "mapper-types.h" #include "gps.h" #include "settings-gconf.h" @@ -61,7 +62,7 @@ return OSSO_OK; } void -osso_cb_hw_state(osso_hw_state_t * state, gpointer data) +osso_cb_hw_state(osso_hw_state_t *state, gpointer data) { static gboolean _must_save_data = FALSE; @@ -74,7 +75,7 @@ if (state->system_inactivity_ind) { gconf_client_clear_cache(gconf_client); gps_conn_set_state(_gps, RCVR_OFF); gps_disconnect(_gps); - track_add(NULL); + track_add(_track, NULL); /* Pretend autoroute is in progress to avoid download. */ if (_autoroute_data.enabled) _autoroute_data.in_progress = TRUE; diff --git a/src/ui-common.c b/src/ui-common.c index 932960c..d4ca92d 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -23,7 +23,9 @@ #include "utils.h" #include "poi.h" +#include "path.h" #include "route.h" +#include "track.h" #include "settings.h" #include "gps.h" #include "map.h" @@ -828,7 +830,7 @@ gps_location_update(Gps *gps) { g_assert(gps); if (filter_check(&filter, &gps->data, &map_loc)==TRUE) { - if (track_add(&_gps->data)) { + if (track_add(_track, &_gps->data)) { KEEP_DISPLAY_ON(); route_check_waypoint_announce(_route, &_gps->data); route_autoroute_check(_route);