summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2008-05-29 16:47:22 +0000
committerskidd13 <skidd13@openttd.org>2008-05-29 16:47:22 +0000
commitbed7719967dfcc27a374e2cf0292bbb057db366e (patch)
tree40aad5ec4c12e047fbf4aba228fd63499f7d7829 /src/network
parenta8abdaec925f194eff2a346f281a89a620314e9f (diff)
downloadopenttd-bed7719967dfcc27a374e2cf0292bbb057db366e.tar.xz
(svn r13328) -Fix (r13327): Don't access an item when there isn't any
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 744bc5c42..2c3cc5721 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -427,7 +427,7 @@ public:
if (id_v >= this->vscroll.cap) return; // click out of bounds
id_v += this->vscroll.pos;
- this->server = this->servers[id_v];
+ this->server = (id_v < this->servers.Length()) ? this->servers[id_v] : NULL;
this->SetDirty();
} break;