# HG changeset patch # User rubidium # Date 1189357196 0 # Node ID f96ccea118f505c2963b70b1c1b7275501c3a4ce # Parent 0b34e035345428f8fc82ea4c2495a316ee070f69 (svn r11071) [0.5] -Fix [FS#1218]: crash when quiting the game in one of the end score windows. diff -r 0b34e0353454 -r f96ccea118f5 main_gui.c --- a/main_gui.c Thu Aug 30 21:06:52 2007 +0000 +++ b/main_gui.c Sun Sep 09 16:59:56 2007 +0000 @@ -1864,9 +1864,10 @@ break; } - case WE_MESSAGE: - HandleZoomMessage(w, FindWindowById(WC_MAIN_WINDOW, 0)->viewport, 17, 18); - break; + case WE_MESSAGE: { + Window *w2 = FindWindowById(WC_MAIN_WINDOW, 0); + if (w2 != NULL) HandleZoomMessage(w, w2->viewport, 17, 18); + } break; } } diff -r 0b34e0353454 -r f96ccea118f5 vehicle.c --- a/vehicle.c Thu Aug 30 21:06:52 2007 +0000 +++ b/vehicle.c Sun Sep 09 16:59:56 2007 +0000 @@ -2098,6 +2098,7 @@ new_v->profit_this_year = old_v->profit_this_year; new_v->profit_last_year = old_v->profit_last_year; new_v->service_interval = old_v->service_interval; + new_v->load_status = old_v->load_status; new_front = true; new_v->unitnumber = old_v->unitnumber; // use the same unit number new_v->dest_tile = old_v->dest_tile;