summaryrefslogtreecommitdiff
path: root/src
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
commit15e89b32b9276d056f4d7f5c2b9683e80286df52 (patch)
treeec278839d7f73dff6624036a531b0dc89668a8b6 /src
parent534bf5b4029f79d49d608b840778b81b88a52e87 (diff)
downloadopenttd-15e89b32b9276d056f4d7f5c2b9683e80286df52.tar.xz
(svn r13098) -Fix [FS#2016]: segmentation fault on opening an already opened depot.
Diffstat (limited to 'src')
-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);
}