From 15e89b32b9276d056f4d7f5c2b9683e80286df52 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 15 May 2008 08:01:46 +0000 Subject: (svn r13098) -Fix [FS#2016]: segmentation fault on opening an already opened depot. --- src/depot_gui.cpp | 2 ++ 1 file changed, 2 insertions(+) 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(&_aircraft_depot_desc, tile); break; } + if (w == NULL) return; + w->caption_color = GetTileOwner(tile); w->CreateDepotListWindow(type); } -- cgit v1.2.3-70-g09d2