summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-26 09:01:28 +0000
committerrubidium <rubidium@openttd.org>2009-12-26 09:01:28 +0000
commite7efb42a278b202807280e6b3586d7cdab6f64af (patch)
tree574996fae732f4c2a15f94741661ee890cdce51c /src/network
parent9cefcdab827b5bc6a3931054b5d1758193ebe600 (diff)
downloadopenttd-e7efb42a278b202807280e6b3586d7cdab6f64af.tar.xz
(svn r18637) -Fix [FS#3428]: check whether the content list is empty before trying to draw it
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content_gui.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 7d3c223db..b179e2091 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -435,6 +435,9 @@ public:
void DrawMatrix(const Rect &r) const
{
+ /* Is there something to do? */
+ if (this->content.Length() == 0) return;
+
const NWidgetBase *nwi_checkbox = this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX);
const NWidgetBase *nwi_name = this->GetWidget<NWidgetBase>(NCLWW_NAME);
const NWidgetBase *nwi_type = this->GetWidget<NWidgetBase>(NCLWW_TYPE);