From 3a08a7e99d4fada983ff78c4e104efae1151b4f8 Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Sun, 22 Mar 2020 14:02:48 +0000 Subject: Fix: Ignore clicks on non-applicable global goals (#8035) --- src/goal_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2