summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-02-07 16:11:21 +0000
committersmatz <smatz@openttd.org>2009-02-07 16:11:21 +0000
commit5b377ed53b7cccd36705461c4d50cce3847d9744 (patch)
tree22dde2c2eee940c20a9874c50e8af284b6e9d8bc /src
parent4431e82bebf61c54347ca21764a984e81f51ae4f (diff)
downloadopenttd-5b377ed53b7cccd36705461c4d50cce3847d9744.tar.xz
(svn r15398) -Fix (r14135): _current_company shouldn't be used in GUI code (Swallow)
Diffstat (limited to 'src')
-rw-r--r--src/waypoint_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index 906cf5c4d..576d614aa 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -11,6 +11,7 @@
#include "strings_func.h"
#include "gfx_func.h"
#include "command_func.h"
+#include "company_func.h"
#include "functions.h"
#include "window_func.h"
@@ -51,7 +52,7 @@ public:
virtual void OnPaint()
{
/* You can only change your own waypoints */
- this->SetWidgetDisabledState(WAYPVW_RENAME, !CheckOwnership(this->wp->owner));
+ this->SetWidgetDisabledState(WAYPVW_RENAME, this->wp->owner != _local_company);
SetDParam(0, this->wp->index);
this->DrawWidgets();