changeset 14090:ad7b9541cf58 draft

(svn r18637) -Fix [FS#3428]: check whether the content list is empty before trying to draw it
author rubidium <rubidium@openttd.org>
date Sat, 26 Dec 2009 09:01:28 +0000
parents 511acd6d8554
children 870f180bc519
files src/network/network_content_gui.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -435,6 +435,9 @@
 
 	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);