src/depot.cpp
changeset 7909 8df54a2839a1
parent 7885 4eb9b01e37ff
child 8604 8afdd9877afd
child 9723 eee46cb39750
equal deleted inserted replaced
7908:403a9694c42d 7909:8df54a2839a1
    35 /**
    35 /**
    36  * Clean up a depot
    36  * Clean up a depot
    37  */
    37  */
    38 Depot::~Depot()
    38 Depot::~Depot()
    39 {
    39 {
       
    40 	if (CleaningPool()) return;
       
    41 
    40 	/* Clear the depot from all order-lists */
    42 	/* Clear the depot from all order-lists */
    41 	RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, this->index);
    43 	RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, this->index);
    42 
    44 
    43 	/* Delete the depot-window */
    45 	/* Delete the depot-window */
    44 	DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);
    46 	DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);