diff options
author | rubidium <rubidium@openttd.org> | 2008-01-17 02:09:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-17 02:09:34 +0000 |
commit | f658b79e152a178a1a6b8c5d585a523de15f1830 (patch) | |
tree | a7f372c06079fcf26b83bcf3fbaf559270c34fce /src/order.h | |
parent | 69c18efdca89cef8ba94ed4a999aba9c1f3d6f25 (diff) | |
download | openttd-f658b79e152a178a1a6b8c5d585a523de15f1830.tar.xz |
(svn r11887) -Fix [FS#1658]: segmentation faults/wrong frees due uninitialized memory in the AI.
Diffstat (limited to 'src/order.h')
-rw-r--r-- | src/order.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/order.h b/src/order.h index ff3c78a95..e961cec80 100644 --- a/src/order.h +++ b/src/order.h @@ -121,7 +121,8 @@ struct Order : PoolItem<Order, OrderID, &_Order_pool> { }; struct BackuppedOrders { - BackuppedOrders() : order(NULL) { } + BackuppedOrders() : order(NULL), name(NULL) { } + ~BackuppedOrders() { free(order); free(name); } VehicleID clone; VehicleOrderID orderindex; |