anchor.diff:    //If the house has been destroyed during the building process then exit immediately
     if fHouse.IsDestroyed then
     begin
  +    Abandon;
       TaskDone:=true; //Drop the task
  -    fUnit.fThought := th_None;
  -    fPlayers.Player[byte(fUnit.fOwner)].BuildList.CloseHouse(TaskID);
       exit;
     end;
     with fUnit do
  
positive.code: end;
  
  
  procedure TTaskSelfTrain.Execute(out TaskDone:boolean);
  begin
  TaskDone:=false;
  if (fSchool = nil) or (fSchool.IsDestroyed) then
  begin
    fUnit.RemoveUntrainedFromSchool; //Abort if someone has destroyed our school
    exit;
  end;
  with fUnit do
  
negative.code:       end;
      public
        constructor Create(aWorker:TKMUnitWorker; aHouse:TKMHouse; aID:integer);
        procedure Abandon();
        procedure Execute(out TaskDone:boolean); override;
      end;
  
  