src/fsmport.cpp
branchNewGRF_ports
changeset 6856 0e8e4ebf23ff
parent 6853 b3b8bb6c0a48
equal deleted inserted replaced
6855:233debbbe961 6856:0e8e4ebf23ff
     6 #include "openttd.h"
     6 #include "openttd.h"
     7 #include "fsmport.h"
     7 #include "fsmport.h"
     8 
     8 
     9 FSMPortClass::~FSMPortClass()
     9 FSMPortClass::~FSMPortClass()
    10 {
    10 {
    11 	for (uint i = 0; i < nof_elements; i++) {
    11 	for (uint i = 0; i < num_positions; i++) {
    12 		FSMState *current = layout[i].next;
    12 		FSMCommand *current = layout[i].next;
    13 		while (current != NULL) {
    13 		while (current != NULL) {
    14 			FSMState *next = current->next;
    14 			FSMCommand *next = current->next;
    15 			free(current);
    15 			free(current);
    16 			current = next;
    16 			current = next;
    17 		};
    17 		};
    18 	}
    18 	}
    19 	free(layout);
    19 	free(layout);