summaryrefslogtreecommitdiff
path: root/src/order.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-17 02:09:34 +0000
committerrubidium <rubidium@openttd.org>2008-01-17 02:09:34 +0000
commitf658b79e152a178a1a6b8c5d585a523de15f1830 (patch)
treea7f372c06079fcf26b83bcf3fbaf559270c34fce /src/order.h
parent69c18efdca89cef8ba94ed4a999aba9c1f3d6f25 (diff)
downloadopenttd-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.h3
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;