# HG changeset patch # User bjarni # Date 1159660415 0 # Node ID a8c4eed3c81e6b69c97c1cb84b7e7c31ec379830 # Parent 9a478541aec8b2ae8cf14536952f1270aa13999e (svn r6595) -Fix r6542: [depot window] clicking sell all in a depot with no vehicles will now do nothing at all (instead of opening the confination window) (spotted by glx) diff -r 9a478541aec8 -r a8c4eed3c81e depot_gui.c --- a/depot_gui.c Sat Sep 30 21:36:00 2006 +0000 +++ b/depot_gui.c Sat Sep 30 23:53:35 2006 +0000 @@ -667,7 +667,10 @@ break; case DEPOT_WIDGET_SELL_ALL: - ShowDepotSellAllWindow(w->window_number, WP(w, depot_d).type); + /* Only open the confimation window if there are anything to sell */ + if (WP(w, depot_d).engine_count != 0 || WP(w, depot_d).wagon_count != 0) { + ShowDepotSellAllWindow(w->window_number, WP(w, depot_d).type); + } break; case DEPOT_WIDGET_VEHICLE_LIST: