summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-12-21 17:29:00 +0000
committerterkhen <terkhen@openttd.org>2010-12-21 17:29:00 +0000
commitb9f93a48e96949b3012d883886de9e9034410451 (patch)
tree09e20f221feb0e9f7107af37ee8b19958bdc512e
parenta448dc24d960efd4cfa403ef2fb6495afb848d95 (diff)
downloadopenttd-b9f93a48e96949b3012d883886de9e9034410451.tar.xz
(svn r21583) -Fix (r21566): The new scrollbar was not ignored correctly for ships and aircrafts.
-rw-r--r--src/vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index cd4febcfa..2d1e15694 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -729,7 +729,7 @@ struct RefitWindow : public Window {
const NWidgetCore *matrix_widget = this->GetWidget<NWidgetCore>(VRW_VEHICLE_PANEL_DISPLAY);
if (_current_text_dir == TD_RTL) click_x = matrix_widget->current_x - click_x;
click_x -= this->vehicle_margin;
- click_x += this->hscroll->GetPosition();
+ if (this->hscroll != NULL) click_x += this->hscroll->GetPosition();
return click_x;
}