summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/subsidy_gui.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index d8b39dbc2..76cbf58b4 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -37,23 +37,29 @@ struct SubsidyListWindow : Window {
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age < 12) {
y -= 10;
- if (y < 0) this->HandleClick(s);
+ if (y < 0) {
+ this->HandleClick(s);
+ return;
+ }
num++;
}
}
if (num == 0) {
- y -= 10;
+ y -= 10; /* "None" */
if (y < 0) return;
}
- y -= 11;
+ y -= 11; /* "Services already subsidised:" */
if (y < 0) return;
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age >= 12) {
y -= 10;
- if (y < 0) this->HandleClick(s);
+ if (y < 0) {
+ this->HandleClick(s);
+ return;
+ }
}
}
}