summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-10-12 16:29:42 +0000
committerfrosch <frosch@openttd.org>2013-10-12 16:29:42 +0000
commit3d5a91424a372b84753c12caa6ea1b94b71082df (patch)
tree25fdcd9a742b55afb15b1024dac4454f91a174e0
parent7a75010b2533b159e8f65e902dc4429460fb1faa (diff)
downloadopenttd-3d5a91424a372b84753c12caa6ea1b94b71082df.tar.xz
(svn r25830) -Fix [FS#5742] (r25540): In BuildObjectWindow, ensure the object spec matrix is always initialized. (sbr)
-rw-r--r--src/object_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index e53ad6de1..3bd379887 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -82,8 +82,8 @@ public:
NWidgetMatrix *matrix = this->GetWidget<NWidgetMatrix>(WID_BO_SELECT_MATRIX);
matrix->SetScrollbar(this->GetScrollbar(WID_BO_SELECT_SCROLL));
+ this->SelectOtherClass(_selected_object_class);
if (this->CanRestoreSelectedObject()) {
- this->SelectOtherClass(_selected_object_class),
this->SelectOtherObject(_selected_object_index);
} else {
this->SelectFirstAvailableObject(true);