summaryrefslogtreecommitdiff
path: root/src/depot_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-15 08:01:46 +0000
committerrubidium <rubidium@openttd.org>2008-05-15 08:01:46 +0000
commit35c14f45bedea917cd85c4c0033c6f46e2ac712b (patch)
treeec278839d7f73dff6624036a531b0dc89668a8b6 /src/depot_gui.cpp
parent7096f20ec5986fbd6c4af31b3feec5d133398107 (diff)
downloadopenttd-35c14f45bedea917cd85c4c0033c6f46e2ac712b.tar.xz
(svn r13098) -Fix [FS#2016]: segmentation fault on opening an already opened depot.
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r--src/depot_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 4a55985ab..9ec0f0c9f 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -1001,6 +1001,8 @@ void ShowDepotWindow(TileIndex tile, VehicleType type)
w = AllocateWindowDescFront<DepotWindow>(&_aircraft_depot_desc, tile); break;
}
+ if (w == NULL) return;
+
w->caption_color = GetTileOwner(tile);
w->CreateDepotListWindow(type);
}