mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-22 07:06:01 +00:00
(svn r1232) Plug memory leak
This commit is contained in:
parent
51257991c0
commit
51cbbd0438
@ -1067,6 +1067,10 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e)
|
||||
vl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
|
||||
break;
|
||||
|
||||
case WE_DESTROY:
|
||||
free(vl->sort_list);
|
||||
break;
|
||||
|
||||
case WE_TICK: /* resort the list every 20 seconds orso (10 days) */
|
||||
if (--vl->resort_timer == 0) {
|
||||
DEBUG(misc, 1) ("Periodic resort aircraft list player %d station %d",
|
||||
|
@ -879,6 +879,10 @@ static void PlayerRoadVehWndProc(Window *w, WindowEvent *e)
|
||||
vl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
|
||||
break;
|
||||
|
||||
case WE_DESTROY:
|
||||
free(vl->sort_list);
|
||||
break;
|
||||
|
||||
case WE_TICK: /* resort the list every 20 seconds orso (10 days) */
|
||||
if (--vl->resort_timer == 0) {
|
||||
DEBUG(misc, 1) ("Periodic resort road vehicles list player %d station %d",
|
||||
|
@ -1047,6 +1047,10 @@ static void PlayerShipsWndProc(Window *w, WindowEvent *e)
|
||||
vl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
|
||||
break;
|
||||
|
||||
case WE_DESTROY:
|
||||
free(vl->sort_list);
|
||||
break;
|
||||
|
||||
case WE_TICK: /* resort the list every 20 seconds orso (10 days) */
|
||||
if (--vl->resort_timer == 0) {
|
||||
DEBUG(misc, 1) ("Periodic resort ships list player %d station %d",
|
||||
|
@ -1351,6 +1351,10 @@ static void PlayerTrainsWndProc(Window *w, WindowEvent *e)
|
||||
vl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
|
||||
break;
|
||||
|
||||
case WE_DESTROY:
|
||||
free(vl->sort_list);
|
||||
break;
|
||||
|
||||
case WE_TICK: /* resort the list every 20 seconds orso (10 days) */
|
||||
if (--vl->resort_timer == 0) {
|
||||
DEBUG(misc, 1) ("Periodic resort trains list player %d station %d",
|
||||
|
Loading…
Reference in New Issue
Block a user