]> err.no Git - mapper/commitdiff
Fix crasher
authorKaj-Michael Lang <milang@tal.org>
Sun, 27 Apr 2008 20:09:05 +0000 (23:09 +0300)
committerKaj-Michael Lang <milang@tal.org>
Sun, 27 Apr 2008 20:09:05 +0000 (23:09 +0300)
src/maemo-osso.c
src/ui-common.c

index 9f6354bfdf35388822f1dfa4cc6a0f952541278e..ead04713ae0ae437c4a6ecb4f93771b0f04b789d 100644 (file)
@@ -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;
index 932960c18391938f837f905cd1d25610bb947ec1..d4ca92d827991638ed3f48f9a2a999e6dcc06241 100644 (file)
@@ -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);