summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2020-03-22 14:02:48 +0000
committerGitHub <noreply@github.com>2020-03-22 15:02:48 +0100
commit3a08a7e99d4fada983ff78c4e104efae1151b4f8 (patch)
tree0d61c93535f36f7b50f7a080b140ab58b4bd009b /src
parente7da6616ba13397a702a16e9cb51aee02a2b41ae (diff)
downloadopenttd-3a08a7e99d4fada983ff78c4e104efae1151b4f8.tar.xz
Fix: Ignore clicks on non-applicable global goals (#8035)
Diffstat (limited to 'src')
-rw-r--r--src/goal_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp
index 7a77b3014..19a432753 100644
--- a/src/goal_gui.cpp
+++ b/src/goal_gui.cpp
@@ -86,7 +86,7 @@ struct GoalListWindow : public Window {
if (y < 0) return;
for (const Goal *s : Goal::Iterate()) {
- if (s->company == this->window_number) {
+ if (s->company == this->window_number && s->company != INVALID_COMPANY) {
y--;
if (y == 0) {
this->HandleClick(s);