--- trunk/src/main.c 2009/12/13 19:57:02 242 +++ trunk/src/main.c 2009/12/14 20:07:54 243 @@ -1856,7 +1856,9 @@ hildon_app_menu_append(menu, GTK_BUTTON(button)); } - if((mode == MENU_GPXLIST) || (mode == MENU_CACHELIST)) { + /* if search results exist, don't allow another search */ + if(!appdata->search_results && + ((mode == MENU_GPXLIST) || (mode == MENU_CACHELIST))) { button = gtk_button_new_with_label(_("Search")); g_signal_connect_after(button, "clicked", G_CALLBACK(cb_menu_search), appdata); @@ -2056,7 +2058,7 @@ void cleanup(appdata_t *appdata) { gconf_save_state(appdata); - + gpx_free_all(appdata->gpx); #ifdef USE_STACKABLE_WINDOW @@ -2068,12 +2070,12 @@ icons_free(); gps_release(appdata); -#ifdef USE_MAEMO if(appdata->search_results) { printf("freeing pending search\n"); search_result_free(appdata->search_results); } +#ifdef USE_MAEMO if(appdata->osso_context) osso_deinitialize(appdata->osso_context);